home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), type ' ' INSTALL, mode 000644 , uid 000147 , gid 000303 , size 00000012562 , seconds 04425707413
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 49 4e 53 54 41 4c 4c 00 | 00 00 00 00 00 00 00 00 |INSTALL.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00000070| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00000080| 30 30 31 32 35 36 32 20 | 30 34 34 32 35 37 30 37 |0012562 |04425707|
|00000090| 34 31 33 20 30 30 35 36 | 35 34 00 20 20 00 00 00 |413 0056|54. ...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 0a 0a 09 09 09 49 4e 53 | 54 41 4c 4c 41 54 49 4f |.....INS|TALLATIO|
|00000210| 4e 20 49 4e 53 54 52 55 | 43 54 49 4f 4e 53 0a 0a |N INSTRU|CTIONS..|
|00000220| 0a 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 69 |.The fol|lowing i|
|00000230| 6e 73 74 72 75 63 74 69 | 6f 6e 73 20 61 72 65 20 |nstructi|ons are |
|00000240| 66 6f 72 20 73 79 73 74 | 65 6d 73 20 72 65 73 65 |for syst|ems rese|
|00000250| 6d 62 6c 69 6e 67 20 4e | 69 6e 74 68 20 45 64 69 |mbling N|inth Edi|
|00000260| 74 69 6f 6e 20 55 4e 49 | 58 2c 20 77 69 74 68 0a |tion UNI|X, with.|
|00000270| 68 69 6e 74 73 20 61 62 | 6f 75 74 20 64 65 61 6c |hints ab|out deal|
|00000280| 69 6e 67 20 77 69 74 68 | 20 76 61 72 69 61 74 69 |ing with| variati|
|00000290| 6f 6e 73 20 79 6f 75 20 | 6d 61 79 20 65 6e 63 6f |ons you |may enco|
|000002a0| 75 6e 74 65 72 20 66 6f | 72 20 79 6f 75 72 20 73 |unter fo|r your s|
|000002b0| 70 65 63 69 66 69 63 20 | 73 79 73 74 65 6d 2e 0a |pecific |system..|
|000002c0| 49 6e 73 74 61 6c 6c 61 | 74 69 6f 6e 20 73 68 6f |Installa|tion sho|
|000002d0| 75 6c 64 20 62 65 20 64 | 6f 6e 65 20 6f 6e 6c 79 |uld be d|one only|
|000002e0| 20 62 79 20 73 6f 6d 65 | 6f 6e 65 20 77 68 6f 20 | by some|one who |
|000002f0| 69 73 20 63 6f 6d 66 6f | 72 74 61 62 6c 65 20 77 |is comfo|rtable w|
|00000300| 69 74 68 20 6d 6f 64 69 | 66 79 69 6e 67 0a 74 68 |ith modi|fying.th|
|00000310| 65 20 73 74 61 6e 64 61 | 72 64 20 43 20 6c 69 62 |e standa|rd C lib|
|00000320| 72 61 72 79 20 61 6e 64 | 20 68 65 61 64 65 72 20 |rary and| header |
|00000330| 66 69 6c 65 73 2e 0a 0a | 49 66 20 79 6f 75 72 20 |files...|If your |
|00000340| 73 79 73 74 65 6d 20 61 | 6c 72 65 61 64 79 20 69 |system a|lready i|
|00000350| 6e 63 6c 75 64 65 73 20 | 64 69 72 65 63 74 6f 72 |ncludes |director|
|00000360| 79 20 61 63 63 65 73 73 | 20 72 6f 75 74 69 6e 65 |y access| routine|
|00000370| 73 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 72 65 |s, you s|hould re|
|00000380| 70 6c 61 63 65 0a 74 68 | 65 6d 20 77 69 74 68 20 |place.th|em with |
|00000390| 74 68 69 73 20 70 61 63 | 6b 61 67 65 2e 20 20 57 |this pac|kage. W|
|000003a0| 65 27 72 65 20 74 72 79 | 69 6e 67 20 74 6f 20 67 |e're try|ing to g|
|000003b0| 65 74 20 74 68 69 73 20 | 73 74 61 6e 64 61 72 64 |et this |standard|
|000003c0| 69 7a 65 64 3b 20 73 65 | 65 20 74 68 65 0a 64 69 |ized; se|e the.di|
|000003d0| 73 63 75 73 73 69 6f 6e | 20 69 6e 20 74 68 65 20 |scussion| in the |
|000003e0| 4e 4f 54 45 53 20 66 69 | 6c 65 2e 0a 0a 49 20 68 |NOTES fi|le...I h|
|000003f0| 61 76 65 20 74 72 69 65 | 64 20 74 6f 20 6d 61 6b |ave trie|d to mak|
|00000400| 65 20 74 68 65 20 73 6f | 75 72 63 65 20 63 6f 64 |e the so|urce cod|
|00000410| 65 20 61 73 20 67 65 6e | 65 72 69 63 20 61 73 20 |e as gen|eric as |
|00000420| 70 6f 73 73 69 62 6c 65 | 2c 20 62 75 74 20 69 66 |possible|, but if|
|00000430| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 0a 70 72 65 | your sy|stem.pre|
|00000440| 64 61 74 65 73 20 53 65 | 76 65 6e 74 68 20 45 64 |dates Se|venth Ed|
|00000450| 69 74 69 6f 6e 20 55 4e | 49 58 20 79 6f 75 20 77 |ition UN|IX you w|
|00000460| 69 6c 6c 20 68 61 76 65 | 20 70 72 6f 62 6c 65 6d |ill have| problem|
|00000470| 73 2e 0a 0a 44 49 53 43 | 4c 41 49 4d 45 52 3a 20 |s...DISC|LAIMER: |
|00000480| 20 41 6c 74 68 6f 75 67 | 68 20 49 20 62 65 6c 69 | Althoug|h I beli|
|00000490| 65 76 65 20 74 68 65 20 | 63 6f 64 65 20 61 6e 64 |eve the |code and|
|000004a0| 20 70 72 6f 63 65 64 75 | 72 65 73 20 64 65 73 63 | procedu|res desc|
|000004b0| 72 69 62 65 64 20 68 65 | 72 65 20 74 6f 20 62 65 |ribed he|re to be|
|000004c0| 0a 63 6f 72 72 65 63 74 | 2c 20 49 20 6d 61 6b 65 |.correct|, I make|
|000004d0| 20 6e 6f 20 77 61 72 72 | 61 6e 74 79 20 6f 66 20 | no warr|anty of |
|000004e0| 61 6e 79 20 6b 69 6e 64 | 2c 20 61 6e 64 20 79 6f |any kind|, and yo|
|000004f0| 75 20 61 72 65 20 61 64 | 76 69 73 65 64 20 74 6f |u are ad|vised to|
|00000500| 20 70 65 72 66 6f 72 6d | 20 79 6f 75 72 0a 6f 77 | perform| your.ow|
|00000510| 6e 20 63 61 72 65 66 75 | 6c 20 74 65 73 74 69 6e |n carefu|l testin|
|00000520| 67 20 62 65 66 6f 72 65 | 20 6d 61 6b 69 6e 67 20 |g before| making |
|00000530| 61 6e 79 20 73 75 62 73 | 74 61 6e 74 69 61 6c 20 |any subs|tantial |
|00000540| 63 68 61 6e 67 65 20 6c | 69 6b 65 20 74 68 69 73 |change l|ike this|
|00000550| 20 74 6f 20 79 6f 75 72 | 0a 70 72 6f 67 72 61 6d | to your|.program|
|00000560| 6d 69 6e 67 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |ming env|ironment|
|00000570| 2e 0a 0a 0a 30 29 20 20 | 46 6f 72 20 61 6e 74 69 |....0) |For anti|
|00000580| 71 75 65 20 73 79 73 74 | 65 6d 73 20 74 68 61 74 |que syst|ems that|
|00000590| 20 64 6f 20 6e 6f 74 20 | 73 75 70 70 6f 72 74 20 | do not |support |
|000005a0| 43 27 73 20 22 76 6f 69 | 64 22 20 64 61 74 61 20 |C's "voi|d" data |
|000005b0| 74 79 70 65 2c 20 65 64 | 69 74 20 74 68 65 20 66 |type, ed|it the f|
|000005c0| 69 6c 65 0a 20 20 20 20 | 73 79 73 2e 64 69 72 65 |ile. |sys.dire|
|000005d0| 6e 74 2e 68 20 74 6f 20 | 61 64 64 20 74 68 65 20 |nt.h to |add the |
|000005e0| 66 6f 6c 6c 6f 77 69 6e | 67 3a 0a 0a 09 74 79 70 |followin|g:...typ|
|000005f0| 65 64 65 66 20 69 6e 74 | 09 09 76 6f 69 64 3b 09 |edef int|..void;.|
|00000600| 2f 2a 20 67 6f 6f 64 20 | 65 6e 6f 75 67 68 20 66 |/* good |enough f|
|00000610| 6f 72 20 67 6f 76 74 20 | 77 6f 72 6b 20 2a 2f 0a |or govt |work */.|
|00000620| 0a 20 20 20 20 49 66 20 | 66 6f 72 20 73 6f 6d 65 |. If |for some|
|00000630| 20 72 65 61 73 6f 6e 20 | 79 6f 75 72 20 3c 73 79 | reason |your <sy|
|00000640| 73 2f 74 79 70 65 73 2e | 68 3e 20 64 6f 65 73 6e |s/types.|h> doesn|
|00000650| 27 74 20 64 65 66 69 6e | 65 20 74 68 65 6d 2c 20 |'t defin|e them, |
|00000660| 61 64 64 20 74 68 65 0a | 20 20 20 20 66 6f 6c 6c |add the.| foll|
|00000670| 6f 77 69 6e 67 20 74 6f | 20 73 79 73 2e 64 69 72 |owing to| sys.dir|
|00000680| 65 6e 74 2e 68 3a 0a 0a | 09 74 79 70 65 64 65 66 |ent.h:..|.typedef|
|00000690| 20 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 09 | unsigne|d short.|
|000006a0| 69 6e 6f 5f 74 3b 09 2f | 2a 20 28 61 73 73 75 6d |ino_t;./|* (assum|
|000006b0| 69 6e 67 20 6f 72 69 67 | 69 6e 61 6c 20 55 46 53 |ing orig|inal UFS|
|000006c0| 29 20 2a 2f 0a 09 74 79 | 70 65 64 65 66 20 6c 6f |) */..ty|pedef lo|
|000006d0| 6e 67 09 09 6f 66 66 5f | 74 3b 09 2f 2a 20 6c 6f |ng..off_|t;./* lo|
|000006e0| 6e 67 20 69 73 20 66 6f | 72 63 65 64 20 62 79 20 |ng is fo|rced by |
|000006f0| 6c 73 65 65 6b 28 29 20 | 2a 2f 0a 0a 20 20 20 20 |lseek() |*/.. |
|00000700| 4e 6f 6e 65 20 6f 66 20 | 74 68 69 73 20 73 68 6f |None of |this sho|
|00000710| 75 6c 64 20 62 65 20 6e | 65 63 65 73 73 61 72 79 |uld be n|ecessary|
|00000720| 20 66 6f 72 20 61 6e 79 | 20 6d 6f 64 65 72 6e 20 | for any| modern |
|00000730| 55 4e 49 58 20 73 79 73 | 74 65 6d 2e 0a 0a 31 29 |UNIX sys|tem...1)|
|00000740| 20 20 43 6f 70 79 20 74 | 68 65 20 66 69 6c 65 20 | Copy t|he file |
|00000750| 64 69 72 65 6e 74 2e 68 | 20 74 6f 20 2f 75 73 72 |dirent.h| to /usr|
|00000760| 2f 69 6e 63 6c 75 64 65 | 2f 64 69 72 65 6e 74 2e |/include|/dirent.|
|00000770| 68 20 61 6e 64 20 63 6f | 70 79 20 74 68 65 20 66 |h and co|py the f|
|00000780| 69 6c 65 0a 20 20 20 20 | 73 79 73 2e 64 69 72 65 |ile. |sys.dire|
|00000790| 6e 74 2e 68 20 74 6f 20 | 2f 75 73 72 2f 69 6e 63 |nt.h to |/usr/inc|
|000007a0| 6c 75 64 65 2f 73 79 73 | 2f 64 69 72 65 6e 74 2e |lude/sys|/dirent.|
|000007b0| 68 2e 20 20 28 54 68 65 | 20 66 69 6c 65 20 73 79 |h. (The| file sy|
|000007c0| 73 2e 5f 64 69 72 2e 68 | 20 69 73 20 61 6c 73 6f |s._dir.h| is also|
|000007d0| 0a 20 20 20 20 70 72 6f | 76 69 64 65 64 20 66 6f |. pro|vided fo|
|000007e0| 72 20 74 68 65 20 42 52 | 4c 20 55 4e 49 58 20 53 |r the BR|L UNIX S|
|000007f0| 79 73 74 65 6d 20 56 20 | 65 6d 75 6c 61 74 69 6f |ystem V |emulatio|
|00000800| 6e 20 66 6f 72 20 34 2e | 6e 42 53 44 2e 20 20 54 |n for 4.|nBSD. T|
|00000810| 68 61 74 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 0a |hat envi|ronment.|
|00000820| 20 20 20 20 75 73 65 73 | 20 64 69 66 66 65 72 65 | uses| differe|
|00000830| 6e 74 20 64 69 72 65 63 | 74 6f 72 79 20 6e 61 6d |nt direc|tory nam|
|00000840| 65 73 20 66 6f 72 20 65 | 76 65 72 79 74 68 69 6e |es for e|verythin|
|00000850| 67 2e 29 0a 0a 32 29 20 | 20 43 6f 70 79 20 74 68 |g.)..2) | Copy th|
|00000860| 65 20 66 69 6c 65 20 64 | 69 72 65 63 74 6f 72 79 |e file d|irectory|
|00000870| 2e 33 63 20 74 6f 20 2f | 75 73 72 2f 6d 61 6e 2f |.3c to /|usr/man/|
|00000880| 6d 61 6e 33 2f 64 69 72 | 65 63 74 6f 72 79 2e 33 |man3/dir|ectory.3|
|00000890| 20 61 6e 64 20 63 6f 70 | 79 20 74 68 65 20 66 69 | and cop|y the fi|
|000008a0| 6c 65 0a 20 20 20 20 64 | 69 72 65 6e 74 2e 34 20 |le. d|irent.4 |
|000008b0| 74 6f 20 2f 75 73 72 2f | 6d 61 6e 2f 6d 61 6e 35 |to /usr/|man/man5|
|000008c0| 2f 64 69 72 65 6e 74 2e | 35 3b 20 65 64 69 74 20 |/dirent.|5; edit |
|000008d0| 74 68 65 20 6e 65 77 20 | 66 69 6c 65 0a 20 20 20 |the new |file. |
|000008e0| 20 2f 75 73 72 2f 6d 61 | 6e 2f 6d 61 6e 33 2f 64 | /usr/ma|n/man3/d|
|000008f0| 69 72 65 63 74 6f 72 79 | 2e 33 20 74 6f 20 63 68 |irectory|.3 to ch|
|00000900| 61 6e 67 65 20 74 68 65 | 20 22 53 45 45 20 41 4c |ange the| "SEE AL|
|00000910| 53 4f 22 20 72 65 66 65 | 72 65 6e 63 65 20 66 72 |SO" refe|rence fr|
|00000920| 6f 6d 20 64 69 72 65 6e | 74 28 34 29 0a 20 20 20 |om diren|t(4). |
|00000930| 20 74 6f 20 64 69 72 65 | 6e 74 28 35 29 20 61 6e | to dire|nt(5) an|
|00000940| 64 20 74 6f 20 63 68 61 | 6e 67 65 20 74 68 65 20 |d to cha|nge the |
|00000950| 33 43 20 6f 6e 20 74 68 | 65 20 66 69 72 73 74 20 |3C on th|e first |
|00000960| 6c 69 6e 65 20 74 6f 20 | 33 3b 20 65 64 69 74 20 |line to |3; edit |
|00000970| 74 68 65 20 6e 65 77 20 | 66 69 6c 65 0a 20 20 20 |the new |file. |
|00000980| 20 2f 75 73 72 2f 6d 61 | 6e 2f 6d 61 6e 35 2f 64 | /usr/ma|n/man5/d|
|00000990| 69 72 65 6e 74 2e 35 20 | 74 6f 20 63 68 61 6e 67 |irent.5 |to chang|
|000009a0| 65 20 74 68 65 20 34 20 | 6f 6e 20 74 68 65 20 66 |e the 4 |on the f|
|000009b0| 69 72 73 74 20 6c 69 6e | 65 20 74 6f 20 35 3b 20 |irst lin|e to 5; |
|000009c0| 74 68 65 6e 20 70 72 69 | 6e 74 0a 20 20 20 20 74 |then pri|nt. t|
|000009d0| 68 65 20 6d 61 6e 75 61 | 6c 20 70 61 67 65 73 20 |he manua|l pages |
|000009e0| 76 69 61 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 0a |via the |command.|
|000009f0| 0a 09 6d 61 6e 20 64 69 | 72 65 63 74 6f 72 79 20 |..man di|rectory |
|00000a00| 64 69 72 65 6e 74 0a 0a | 20 20 20 20 74 6f 20 73 |dirent..| to s|
|00000a10| 65 65 20 77 68 61 74 20 | 74 68 65 20 6e 65 77 20 |ee what |the new |
|00000a20| 72 6f 75 74 69 6e 65 73 | 20 61 72 65 20 6c 69 6b |routines| are lik|
|00000a30| 65 2e 20 20 28 49 66 20 | 79 6f 75 20 68 61 76 65 |e. (If |you have|
|00000a40| 20 61 20 22 63 61 74 6d | 61 6e 22 20 73 74 79 6c | a "catm|an" styl|
|00000a50| 65 20 6f 66 0a 20 20 20 | 20 6f 6e 2d 6c 69 6e 65 |e of. | on-line|
|00000a60| 20 6d 61 6e 75 61 6c 2c | 20 61 64 61 70 74 20 74 | manual,| adapt t|
|00000a70| 68 65 73 65 20 69 6e 73 | 74 72 75 63 74 69 6f 6e |hese ins|truction|
|00000a80| 73 20 61 63 63 6f 72 64 | 69 6e 67 6c 79 2e 20 20 |s accord|ingly. |
|00000a90| 4d 61 6e 75 61 6c 20 65 | 6e 74 72 69 65 73 20 61 |Manual e|ntries a|
|00000aa0| 72 65 0a 20 20 20 20 6b | 65 70 74 20 69 6e 20 64 |re. k|ept in d|
|00000ab0| 69 72 65 63 74 6f 72 69 | 65 73 20 77 69 74 68 20 |irectori|es with |
|00000ac0| 6f 74 68 65 72 20 6e 61 | 6d 65 73 20 6f 6e 20 73 |other na|mes on s|
|00000ad0| 6f 6d 65 20 73 79 73 74 | 65 6d 73 20 73 75 63 68 |ome syst|ems such|
|00000ae0| 20 61 73 20 55 4e 49 58 | 20 53 79 73 74 65 6d 20 | as UNIX| System |
|00000af0| 56 2e 0a 20 20 20 20 4f | 6e 20 73 79 73 74 65 6d |V.. O|n system|
|00000b00| 73 20 74 68 61 74 20 61 | 6c 72 65 61 64 79 20 68 |s that a|lready h|
|00000b10| 61 64 20 61 20 64 69 72 | 65 63 74 6f 72 79 20 6c |ad a dir|ectory l|
|00000b20| 69 62 72 61 72 79 20 64 | 6f 63 75 6d 65 6e 74 65 |ibrary d|ocumente|
|00000b30| 64 20 69 6e 20 73 6f 6d | 65 20 6f 74 68 65 72 0a |d in som|e other.|
|00000b40| 20 20 20 20 6d 61 6e 75 | 61 6c 20 65 6e 74 72 79 | manu|al entry|
|00000b50| 2c 20 72 65 6d 6f 76 65 | 20 74 68 65 20 73 75 70 |, remove| the sup|
|00000b60| 65 72 73 65 64 65 64 20 | 6d 61 6e 75 61 6c 20 65 |erseded |manual e|
|00000b70| 6e 74 72 79 3b 20 69 66 | 20 74 68 65 20 64 65 73 |ntry; if| the des|
|00000b80| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 0a |cription| of the.|
|00000b90| 20 20 20 20 6e 61 74 69 | 76 65 20 66 69 6c 65 73 | nati|ve files|
|00000ba0| 79 73 74 65 6d 20 64 69 | 72 65 63 74 6f 72 79 20 |ystem di|rectory |
|00000bb0| 66 6f 72 6d 61 74 20 66 | 6f 75 6e 64 20 62 79 20 |format f|ound by |
|00000bc0| 22 6d 61 6e 20 64 69 72 | 22 20 72 65 66 65 72 73 |"man dir|" refers|
|00000bd0| 20 74 6f 20 61 20 64 69 | 72 65 63 74 6f 72 79 0a | to a di|rectory.|
|00000be0| 20 20 20 20 6c 69 62 72 | 61 72 79 2c 20 6d 6f 64 | libr|ary, mod|
|00000bf0| 69 66 79 20 69 74 20 74 | 6f 20 73 69 6d 70 6c 79 |ify it t|o simply|
|00000c00| 20 72 65 66 65 72 20 74 | 6f 20 74 68 65 20 65 6e | refer t|o the en|
|00000c10| 74 72 79 20 66 6f 72 20 | 22 64 69 72 65 6e 74 22 |try for |"dirent"|
|00000c20| 2e 29 0a 0a 33 29 20 20 | 43 6f 70 79 20 74 68 65 |.)..3) |Copy the|
|00000c30| 20 66 69 6c 65 73 20 63 | 6c 6f 73 65 64 69 72 2e | files c|losedir.|
|00000c40| 63 2c 20 6f 70 65 6e 64 | 69 72 2e 63 2c 20 72 65 |c, opend|ir.c, re|
|00000c50| 61 64 64 69 72 2e 63 2c | 20 72 65 77 69 6e 64 64 |addir.c,| rewindd|
|00000c60| 69 72 2e 63 2c 20 73 65 | 65 6b 64 69 72 2e 63 2c |ir.c, se|ekdir.c,|
|00000c70| 0a 20 20 20 20 61 6e 64 | 20 74 65 6c 6c 64 69 72 |. and| telldir|
|00000c80| 2e 63 20 74 6f 20 74 68 | 65 20 22 67 65 6e 22 20 |.c to th|e "gen" |
|00000c90| 6f 72 20 22 70 6f 72 74 | 2f 67 65 6e 22 20 73 75 |or "port|/gen" su|
|00000ca0| 62 64 69 72 65 63 74 6f | 72 79 20 6f 66 20 79 6f |bdirecto|ry of yo|
|00000cb0| 75 72 20 43 20 6c 69 62 | 72 61 72 79 0a 20 20 20 |ur C lib|rary. |
|00000cc0| 20 73 6f 75 72 63 65 20 | 64 69 72 65 63 74 6f 72 | source |director|
|00000cd0| 79 2e 20 20 49 66 20 79 | 6f 75 20 64 6f 20 6e 6f |y. If y|ou do no|
|00000ce0| 74 20 68 61 76 65 20 61 | 20 67 65 74 64 65 6e 74 |t have a| getdent|
|00000cf0| 73 28 29 20 73 79 73 74 | 65 6d 20 63 61 6c 6c 2c |s() syst|em call,|
|00000d00| 20 63 6f 70 79 20 74 68 | 65 0a 20 20 20 20 66 69 | copy th|e. fi|
|00000d10| 6c 65 20 67 65 74 64 65 | 6e 74 73 2e 63 20 74 6f |le getde|nts.c to|
|00000d20| 20 74 68 65 20 22 73 79 | 73 22 20 6f 72 20 22 70 | the "sy|s" or "p|
|00000d30| 6f 72 74 2f 73 79 73 22 | 20 73 75 62 64 69 72 65 |ort/sys"| subdire|
|00000d40| 63 74 6f 72 79 20 61 6e | 64 20 63 6f 70 79 20 74 |ctory an|d copy t|
|00000d50| 68 65 20 66 69 6c 65 0a | 20 20 20 20 67 65 74 64 |he file.| getd|
|00000d60| 65 6e 74 73 2e 32 20 74 | 6f 20 2f 75 73 72 2f 6d |ents.2 t|o /usr/m|
|00000d70| 61 6e 2f 6d 61 6e 32 2f | 67 65 74 64 65 6e 74 73 |an/man2/|getdents|
|00000d80| 2e 32 20 28 61 63 74 75 | 61 6c 6c 79 20 79 6f 75 |.2 (actu|ally you|
|00000d90| 20 6d 61 79 20 70 72 65 | 66 65 72 20 74 6f 20 70 | may pre|fer to p|
|00000da0| 75 74 20 74 68 69 73 0a | 20 20 20 20 66 69 6c 65 |ut this.| file|
|00000db0| 20 69 6e 20 73 65 63 74 | 69 6f 6e 20 33 20 61 6e | in sect|ion 3 an|
|00000dc0| 64 20 61 64 6a 75 73 74 | 20 74 68 65 20 72 65 66 |d adjust| the ref|
|00000dd0| 65 72 65 6e 63 65 73 20 | 69 6e 20 74 68 65 20 6f |erences |in the o|
|00000de0| 74 68 65 72 20 6d 61 6e | 75 61 6c 20 65 6e 74 72 |ther man|ual entr|
|00000df0| 69 65 73 0a 20 20 20 20 | 61 63 63 6f 72 64 69 6e |ies. |accordin|
|00000e00| 67 6c 79 3b 20 61 6c 73 | 6f 20 61 64 6a 75 73 74 |gly; als|o adjust|
|00000e10| 20 74 68 65 20 72 65 66 | 65 72 65 6e 63 65 73 20 | the ref|erences |
|00000e20| 74 6f 20 64 69 72 65 6e | 74 28 34 29 20 74 6f 20 |to diren|t(4) to |
|00000e30| 62 65 20 74 6f 20 64 69 | 72 65 6e 74 28 35 29 20 |be to di|rent(5) |
|00000e40| 69 66 0a 20 20 20 20 74 | 68 61 74 27 73 20 77 68 |if. t|hat's wh|
|00000e50| 65 72 65 20 74 68 65 20 | 65 6e 74 72 79 20 69 73 |ere the |entry is|
|00000e60| 29 2e 20 20 45 64 69 74 | 20 74 68 65 20 43 20 6c |). Edit| the C l|
|00000e70| 69 62 72 61 72 79 20 6d | 61 6b 65 66 69 6c 65 28 |ibrary m|akefile(|
|00000e80| 73 29 20 74 6f 20 69 6e | 63 6c 75 64 65 20 74 68 |s) to in|clude th|
|00000e90| 65 0a 20 20 20 20 6e 65 | 77 20 6f 62 6a 65 63 74 |e. ne|w object|
|00000ea0| 20 6d 6f 64 75 6c 65 73 | 20 69 6e 20 74 68 65 20 | modules| in the |
|00000eb0| 43 20 6c 69 62 72 61 72 | 79 2e 20 20 28 53 65 65 |C librar|y. (See|
|00000ec0| 20 74 68 65 20 63 6f 6d | 6d 65 6e 74 73 20 61 74 | the com|ments at|
|00000ed0| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|00000ee0| 66 0a 20 20 20 20 67 65 | 74 64 65 6e 74 73 2e 63 |f. ge|tdents.c|
|00000ef0| 20 66 6f 72 20 73 79 6d | 62 6f 6c 73 20 74 68 61 | for sym|bols tha|
|00000f00| 74 20 6d 75 73 74 20 62 | 65 20 64 65 66 69 6e 65 |t must b|e define|
|00000f10| 64 20 74 6f 20 63 6f 6e | 66 69 67 75 72 65 20 67 |d to con|figure g|
|00000f20| 65 74 64 65 6e 74 73 2e | 63 2e 29 20 20 54 68 65 |etdents.|c.) The|
|00000f30| 6e 0a 20 20 20 20 72 65 | 6d 61 6b 65 20 61 6e 64 |n. re|make and|
|00000f40| 20 72 65 69 6e 73 74 61 | 6c 6c 20 74 68 65 20 43 | reinsta|ll the C|
|00000f50| 20 6c 69 62 72 61 72 79 | 2e 20 20 41 6c 74 65 72 | library|. Alter|
|00000f60| 6e 61 74 69 76 65 6c 79 | 2c 20 79 6f 75 20 63 61 |natively|, you ca|
|00000f70| 6e 20 6a 75 73 74 20 63 | 6f 6d 70 69 6c 65 0a 20 |n just c|ompile. |
|00000f80| 20 20 20 74 68 65 20 6e | 65 77 20 73 6f 75 72 63 | the n|ew sourc|
|00000f90| 65 73 20 61 6e 64 20 69 | 6e 73 65 72 74 20 74 68 |es and i|nsert th|
|00000fa0| 65 69 72 20 6f 62 6a 65 | 63 74 73 20 6e 65 61 72 |eir obje|cts near|
|00000fb0| 20 74 68 65 20 66 72 6f | 6e 74 20 6f 66 20 74 68 | the fro|nt of th|
|00000fc0| 65 20 43 20 6c 69 62 72 | 61 72 79 0a 20 20 20 20 |e C libr|ary. |
|00000fd0| 2f 6c 69 62 2f 6c 69 62 | 63 2e 61 20 75 73 69 6e |/lib/lib|c.a usin|
|00000fe0| 67 20 74 68 65 20 22 61 | 72 22 20 75 74 69 6c 69 |g the "a|r" utili|
|00000ff0| 74 79 20 28 73 65 65 6b | 64 69 72 2e 6f 20 73 68 |ty (seek|dir.o sh|
|00001000| 6f 75 6c 64 20 70 72 65 | 63 65 64 65 20 72 65 61 |ould pre|cede rea|
|00001010| 64 64 69 72 2e 6f 2c 0a | 20 20 20 20 77 68 69 63 |ddir.o,.| whic|
|00001020| 68 20 69 6e 20 74 75 72 | 6e 20 73 68 6f 75 6c 64 |h in tur|n should|
|00001030| 20 70 72 65 63 65 64 65 | 20 67 65 74 64 65 6e 74 | precede| getdent|
|00001040| 73 2e 6f 29 2e 20 20 4f | 6e 20 73 6f 6d 65 20 73 |s.o). O|n some s|
|00001050| 79 73 74 65 6d 73 20 79 | 6f 75 20 74 68 65 6e 20 |ystems y|ou then |
|00001060| 6e 65 65 64 20 74 6f 0a | 20 20 20 20 75 73 65 20 |need to.| use |
|00001070| 74 68 65 20 22 72 61 6e | 6c 69 62 22 20 75 74 69 |the "ran|lib" uti|
|00001080| 6c 69 74 79 20 74 6f 20 | 75 70 64 61 74 65 20 74 |lity to |update t|
|00001090| 68 65 20 61 72 63 68 69 | 76 65 20 73 79 6d 62 6f |he archi|ve symbo|
|000010a0| 6c 20 74 61 62 6c 65 2e | 0a 0a 34 29 20 20 41 66 |l table.|..4) Af|
|000010b0| 74 65 72 20 74 68 65 20 | 43 20 6c 69 62 72 61 72 |ter the |C librar|
|000010c0| 79 20 68 61 73 20 62 65 | 65 6e 20 75 70 64 61 74 |y has be|en updat|
|000010d0| 65 64 2c 20 64 65 6c 65 | 74 65 20 2f 75 73 72 2f |ed, dele|te /usr/|
|000010e0| 69 6e 63 6c 75 64 65 2f | 6e 64 69 72 2e 68 20 6f |include/|ndir.h o|
|000010f0| 72 20 61 6e 79 0a 20 20 | 20 20 6f 74 68 65 72 20 |r any. | other |
|00001100| 68 65 61 64 65 72 20 75 | 73 65 64 20 77 69 74 68 |header u|sed with|
|00001110| 20 61 20 70 72 65 76 69 | 6f 75 73 20 64 69 72 65 | a previ|ous dire|
|00001120| 63 74 6f 72 79 20 6c 69 | 62 72 61 72 79 20 74 6f |ctory li|brary to|
|00001130| 20 70 72 65 76 65 6e 74 | 20 69 6e 61 64 76 65 72 | prevent| inadver|
|00001140| 74 65 6e 74 0a 20 20 20 | 20 75 73 65 20 6f 66 20 |tent. | use of |
|00001150| 74 68 65 20 73 75 70 65 | 72 73 65 64 65 64 20 64 |the supe|rseded d|
|00001160| 69 72 65 63 74 6f 72 79 | 20 61 63 63 65 73 73 20 |irectory| access |
|00001170| 69 6e 74 65 72 66 61 63 | 65 2e 20 20 41 6c 73 6f |interfac|e. Also|
|00001180| 20 64 65 6c 65 74 65 20 | 61 6e 79 0a 20 20 20 20 | delete |any. |
|00001190| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 6c 69 |correspo|nding li|
|000011a0| 62 72 61 72 79 20 73 75 | 63 68 20 61 73 20 2f 75 |brary su|ch as /u|
|000011b0| 73 72 2f 6c 69 62 2f 6c | 69 62 6e 64 69 72 2e 61 |sr/lib/l|ibndir.a|
|000011c0| 2e 0a 0a 35 29 20 20 54 | 6f 20 76 65 72 69 66 79 |...5) T|o verify|
|000011d0| 20 69 6e 73 74 61 6c 6c | 61 74 69 6f 6e 2c 20 74 | install|ation, t|
|000011e0| 72 79 20 63 6f 6d 70 69 | 6c 69 6e 67 2c 20 6c 69 |ry compi|ling, li|
|000011f0| 6e 6b 69 6e 67 2c 20 61 | 6e 64 20 72 75 6e 6e 69 |nking, a|nd runni|
|00001200| 6e 67 20 74 68 65 20 70 | 72 6f 67 72 61 6d 0a 20 |ng the p|rogram. |
|00001210| 20 20 20 74 65 73 74 64 | 69 72 2e 63 2e 20 20 54 | testd|ir.c. T|
|00001220| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 73 65 61 72 |his prog|ram sear|
|00001230| 63 68 65 73 20 74 68 65 | 20 63 75 72 72 65 6e 74 |ches the| current|
|00001240| 20 64 69 72 65 63 74 6f | 72 79 20 22 2e 22 20 66 | directo|ry "." f|
|00001250| 6f 72 20 65 61 63 68 20 | 66 69 6c 65 0a 20 20 20 |or each |file. |
|00001260| 20 6e 61 6d 65 64 20 61 | 73 20 61 20 70 72 6f 67 | named a|s a prog|
|00001270| 72 61 6d 20 61 72 67 75 | 6d 65 6e 74 20 61 6e 64 |ram argu|ment and|
|00001280| 20 70 72 69 6e 74 73 20 | 60 22 46 4f 4f 22 20 66 | prints |`"FOO" f|
|00001290| 6f 75 6e 64 2e 27 20 6f | 72 20 60 22 46 4f 4f 22 |ound.' o|r `"FOO"|
|000012a0| 20 6e 6f 74 20 66 6f 75 | 6e 64 2e 27 0a 20 20 20 | not fou|nd.'. |
|000012b0| 20 77 68 65 72 65 20 46 | 4f 4f 20 69 73 20 6f 66 | where F|OO is of|
|000012c0| 20 63 6f 75 72 73 65 20 | 72 65 70 6c 61 63 65 64 | course |replaced|
|000012d0| 20 62 79 20 74 68 65 20 | 6e 61 6d 65 20 62 65 69 | by the |name bei|
|000012e0| 6e 67 20 73 6f 75 67 68 | 74 20 69 6e 20 74 68 65 |ng sough|t in the|
|000012f0| 20 64 69 72 65 63 74 6f | 72 79 2e 0a 20 20 20 20 | directo|ry.. |
|00001300| 54 72 79 20 73 6f 6d 65 | 74 68 69 6e 67 20 6c 69 |Try some|thing li|
|00001310| 6b 65 0a 0a 09 63 64 20 | 2f 75 73 72 2f 62 69 6e |ke...cd |/usr/bin|
|00001320| 09 09 09 23 20 61 20 6d | 75 6c 74 69 2d 62 6c 6f |...# a m|ulti-blo|
|00001330| 63 6b 20 64 69 72 65 63 | 74 6f 72 79 0a 09 57 48 |ck direc|tory..WH|
|00001340| 45 52 45 56 45 52 2f 74 | 65 73 74 64 69 72 20 46 |EREVER/t|estdir F|
|00001350| 4f 4f 20 6c 69 6e 74 20 | 42 41 52 20 66 37 37 20 |OO lint |BAR f77 |
|00001360| 58 59 5a 5a 59 0a 0a 20 | 20 20 20 77 68 69 63 68 |XYZZY.. | which|
|00001370| 20 73 68 6f 75 6c 64 20 | 70 72 6f 64 75 63 65 20 | should |produce |
|00001380| 74 68 65 20 6f 75 74 70 | 75 74 0a 0a 09 22 46 4f |the outp|ut..."FO|
|00001390| 4f 22 20 6e 6f 74 20 66 | 6f 75 6e 64 2e 0a 09 22 |O" not f|ound..."|
|000013a0| 6c 69 6e 74 22 20 66 6f | 75 6e 64 2e 0a 09 22 42 |lint" fo|und..."B|
|000013b0| 41 52 22 20 6e 6f 74 20 | 66 6f 75 6e 64 2e 0a 09 |AR" not |found...|
|000013c0| 22 66 37 37 22 20 66 6f | 75 6e 64 2e 0a 09 22 58 |"f77" fo|und..."X|
|000013d0| 59 5a 5a 59 22 20 6e 6f | 74 20 66 6f 75 6e 64 2e |YZZY" no|t found.|
|000013e0| 0a 0a 20 20 20 20 41 20 | 6d 6f 72 65 20 74 68 6f |.. A |more tho|
|000013f0| 72 6f 75 67 68 20 74 65 | 73 74 20 77 6f 75 6c 64 |rough te|st would|
|00001400| 20 62 65 0a 0a 09 63 64 | 20 2f 75 73 72 2f 62 69 | be...cd| /usr/bi|
|00001410| 6e 09 09 09 23 20 61 20 | 6d 75 6c 74 69 2d 62 6c |n...# a |multi-bl|
|00001420| 6f 63 6b 20 64 69 72 65 | 63 74 6f 72 79 0a 09 57 |ock dire|ctory..W|
|00001430| 48 45 52 45 56 45 52 2f | 74 65 73 74 64 69 72 20 |HEREVER/|testdir |
|00001440| 60 6c 73 20 2d 61 60 20 | 7c 20 67 72 65 70 20 27 |`ls -a` || grep '|
|00001450| 6e 6f 74 20 66 6f 75 6e | 64 27 0a 0a 20 20 20 20 |not foun|d'.. |
|00001460| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 64 6f 65 |This pro|gram doe|
|00001470| 73 20 6e 6f 74 20 74 65 | 73 74 20 74 68 65 20 73 |s not te|st the s|
|00001480| 65 65 6b 64 69 72 28 29 | 20 61 6e 64 20 74 65 6c |eekdir()| and tel|
|00001490| 6c 64 69 72 28 29 20 66 | 75 6e 63 74 69 6f 6e 73 |ldir() f|unctions|
|000014a0| 2e 0a 0a 36 29 20 20 4e | 6f 74 69 66 79 20 79 6f |...6) N|otify yo|
|000014b0| 75 72 20 70 72 6f 67 72 | 61 6d 6d 65 72 73 20 74 |ur progr|ammers t|
|000014c0| 68 61 74 20 61 6c 6c 20 | 64 69 72 65 63 74 6f 72 |hat all |director|
|000014d0| 79 20 61 63 63 65 73 73 | 20 6d 75 73 74 20 62 65 |y access| must be|
|000014e0| 20 6d 61 64 65 20 74 68 | 72 6f 75 67 68 20 74 68 | made th|rough th|
|000014f0| 65 0a 20 20 20 20 6e 65 | 77 20 69 6e 74 65 72 66 |e. ne|w interf|
|00001500| 61 63 65 2c 20 61 6e 64 | 20 74 68 61 74 20 64 6f |ace, and| that do|
|00001510| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 69 73 20 61 |cumentat|ion is a|
|00001520| 76 61 69 6c 61 62 6c 65 | 20 76 69 61 0a 0a 09 6d |vailable| via...m|
|00001530| 61 6e 20 64 69 72 65 63 | 74 6f 72 79 20 64 69 72 |an direc|tory dir|
|00001540| 65 6e 74 0a 0a 20 20 20 | 20 4d 61 6b 65 20 74 68 |ent.. | Make th|
|00001550| 65 20 4e 4f 54 45 53 20 | 66 69 6c 65 20 61 76 61 |e NOTES |file ava|
|00001560| 69 6c 61 62 6c 65 20 74 | 6f 20 74 68 6f 73 65 20 |ilable t|o those |
|00001570| 70 72 6f 67 72 61 6d 6d | 65 72 73 20 77 68 6f 20 |programm|ers who |
|00001580| 6d 69 67 68 74 20 77 61 | 6e 74 20 74 6f 0a 20 20 |might wa|nt to. |
|00001590| 20 20 75 6e 64 65 72 73 | 74 61 6e 64 20 77 68 61 | unders|tand wha|
|000015a0| 74 20 74 68 69 73 20 69 | 73 20 61 6c 6c 20 61 62 |t this i|s all ab|
|000015b0| 6f 75 74 2e 0a 0a 37 29 | 20 20 43 68 61 6e 67 65 |out...7)| Change|
|000015c0| 20 61 6c 6c 20 73 79 73 | 74 65 6d 20 73 6f 75 72 | all sys|tem sour|
|000015d0| 63 65 73 20 74 68 61 74 | 20 77 65 72 65 20 61 63 |ces that| were ac|
|000015e0| 63 65 73 73 69 6e 67 20 | 64 69 72 65 63 74 6f 72 |cessing |director|
|000015f0| 69 65 73 20 74 6f 20 75 | 73 65 20 74 68 65 20 6e |ies to u|se the n|
|00001600| 65 77 0a 20 20 20 20 72 | 6f 75 74 69 6e 65 73 2e |ew. r|outines.|
|00001610| 20 20 4e 65 61 72 6c 79 | 20 61 6c 6c 20 73 75 63 | Nearly| all suc|
|00001620| 68 20 73 6f 75 72 63 65 | 73 20 63 6f 6e 74 61 69 |h source|s contai|
|00001630| 6e 20 74 68 65 20 6c 69 | 6e 65 0a 0a 09 23 69 6e |n the li|ne...#in|
|00001640| 63 6c 75 64 65 20 3c 73 | 79 73 2f 64 69 72 2e 68 |clude <s|ys/dir.h|
|00001650| 3e 0a 20 20 20 20 6f 72 | 0a 09 23 69 6e 63 6c 75 |>. or|..#inclu|
|00001660| 64 65 20 3c 6e 64 69 72 | 2e 68 3e 0a 0a 20 20 20 |de <ndir|.h>.. |
|00001670| 20 73 6f 20 74 68 65 79 | 20 73 68 6f 75 6c 64 20 | so they| should |
|00001680| 62 65 20 65 61 73 79 20 | 74 6f 20 66 69 6e 64 2e |be easy |to find.|
|00001690| 20 20 28 49 66 20 79 6f | 75 20 65 61 72 6c 69 65 | (If yo|u earlie|
|000016a0| 72 20 72 65 6d 6f 76 65 | 64 20 73 6f 6d 65 20 6f |r remove|d some o|
|000016b0| 74 68 65 72 20 68 65 61 | 64 65 72 0a 20 20 20 20 |ther hea|der. |
|000016c0| 66 69 6c 65 2c 20 74 68 | 61 74 20 69 73 2c 20 69 |file, th|at is, i|
|000016d0| 66 20 74 68 69 73 20 70 | 61 63 6b 61 67 65 20 73 |f this p|ackage s|
|000016e0| 75 70 65 72 73 65 64 65 | 64 20 61 6e 20 65 61 72 |upersede|d an ear|
|000016f0| 6c 69 65 72 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |lier ver|sion of |
|00001700| 74 68 65 0a 20 20 20 20 | 64 69 72 65 63 74 6f 72 |the. |director|
|00001710| 79 20 61 63 63 65 73 73 | 20 6c 69 62 72 61 72 79 |y access| library|
|00001720| 2c 20 6c 6f 6f 6b 20 66 | 6f 72 20 69 74 73 20 6e |, look f|or its n|
|00001730| 61 6d 65 20 74 6f 6f 2e | 20 20 53 65 65 20 74 68 |ame too.| See th|
|00001740| 65 20 63 6f 6e 76 65 72 | 73 69 6f 6e 0a 20 20 20 |e conver|sion. |
|00001750| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 20 69 6e | instruc|tions in|
|00001760| 20 74 68 65 20 4e 4f 54 | 45 53 20 66 69 6c 65 2e | the NOT|ES file.|
|00001770| 29 0a 6f 67 72 61 6d 6d | 65 72 73 20 77 68 6f 20 |).ogramm|ers who |
|00001780| 6d 69 67 68 74 20 77 61 | 6e 74 20 74 6f 0a 20 20 |might wa|nt to. |
|00001790| 20 20 75 6e 64 65 72 73 | 74 61 6e 64 20 77 68 61 | unders|tand wha|
|000017a0| 74 20 74 68 69 73 20 69 | 73 20 61 6c 6c 20 61 62 |t this i|s all ab|
|000017b0| 6f 75 74 2e 0a 0a 37 29 | 20 20 43 68 61 6e 67 65 |out...7)| Change|
|000017c0| 20 61 6c 6c 20 73 79 73 | 74 65 6d 20 73 6f 75 72 | all sys|tem sour|
|000017d0| 63 65 73 20 74 68 61 74 | 20 77 65 72 65 20 61 63 |ces that| were ac|
|000017e0| 63 65 73 73 69 6e 67 20 | 64 69 72 65 63 74 6f 72 |cessing |director|
|000017f0| 69 65 73 20 74 6f 20 75 | 73 65 20 74 68 65 20 6e |ies to u|se the n|
|00001800| 4d 61 6b 65 66 69 6c 65 | 00 00 00 00 00 00 00 00 |Makefile|........|
|00001810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00001870| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00001880| 30 30 30 30 35 34 33 20 | 30 34 34 32 35 37 30 37 |0000543 |04425707|
|00001890| 34 31 34 20 30 30 36 32 | 36 30 00 20 20 00 00 00 |414 0062|60. ...|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 43 52 4f 53 53 44 49 52 | 20 3d 20 2f 64 73 72 67 |CROSSDIR| = /dsrg|
|00001a10| 2f 62 61 6d 6d 69 2f 63 | 72 6f 73 73 2d 6d 69 6e |/bammi/c|ross-min|
|00001a20| 69 78 0a 43 52 4f 53 53 | 4c 49 42 20 3d 20 24 28 |ix.CROSS|LIB = $(|
|00001a30| 43 52 4f 53 53 44 49 52 | 29 2f 6c 69 62 0a 43 52 |CROSSDIR|)/lib.CR|
|00001a40| 4f 53 53 42 49 4e 20 3d | 20 24 28 43 52 4f 53 53 |OSSBIN =| $(CROSS|
|00001a50| 44 49 52 29 2f 62 69 6e | 0a 0a 61 6c 6c 3a 20 6c |DIR)/bin|..all: l|
|00001a60| 69 62 64 69 72 2e 61 20 | 6c 69 62 64 69 72 33 32 |ibdir.a |libdir32|
|00001a70| 2e 61 0a 0a 6c 69 62 64 | 69 72 2e 61 3a 0a 09 6d |.a..libd|ir.a:..m|
|00001a80| 61 6b 65 20 2d 66 20 4d | 61 6b 65 66 69 6c 65 2e |ake -f M|akefile.|
|00001a90| 31 36 20 63 6c 65 61 6e | 0a 09 6d 61 6b 65 20 2d |16 clean|..make -|
|00001aa0| 66 20 4d 61 6b 65 66 69 | 6c 65 2e 31 36 0a 0a 6c |f Makefi|le.16..l|
|00001ab0| 69 62 64 69 72 33 32 2e | 61 3a 0a 09 6d 61 6b 65 |ibdir32.|a:..make|
|00001ac0| 20 2d 66 20 4d 61 6b 65 | 66 69 6c 65 2e 33 32 20 | -f Make|file.32 |
|00001ad0| 63 6c 65 61 6e 0a 09 6d | 61 6b 65 20 2d 66 20 4d |clean..m|ake -f M|
|00001ae0| 61 6b 65 66 69 6c 65 2e | 33 32 0a 0a 63 6c 65 61 |akefile.|32..clea|
|00001af0| 6e 3a 0a 09 6d 61 6b 65 | 20 2d 66 20 4d 61 6b 65 |n:..make| -f Make|
|00001b00| 66 69 6c 65 2e 31 36 20 | 63 6c 65 61 6e 0a 09 6d |file.16 |clean..m|
|00001b10| 61 6b 65 20 2d 66 20 4d | 61 6b 65 66 69 6c 65 2e |ake -f M|akefile.|
|00001b20| 33 32 20 63 6c 65 61 6e | 0a 09 72 6d 20 2d 66 20 |32 clean|..rm -f |
|00001b30| 63 6f 72 65 0a 0a 69 6e | 73 74 61 6c 6c 3a 0a 09 |core..in|stall:..|
|00001b40| 63 70 20 6c 69 62 64 69 | 72 2e 61 20 6c 69 62 64 |cp libdi|r.a libd|
|00001b50| 69 72 33 32 2e 61 20 24 | 28 43 52 4f 53 53 4c 49 |ir32.a $|(CROSSLI|
|00001b60| 42 29 0a 65 20 4e 4f 54 | 45 53 20 66 69 6c 65 2e |B).e NOT|ES file.|
|00001b70| 29 0a 6f 67 72 61 6d 6d | 65 72 73 20 77 68 6f 20 |).ogramm|ers who |
|00001b80| 6d 69 67 68 74 20 77 61 | 6e 74 20 74 6f 0a 20 20 |might wa|nt to. |
|00001b90| 20 20 75 6e 64 65 72 73 | 74 61 6e 64 20 77 68 61 | unders|tand wha|
|00001ba0| 74 20 74 68 69 73 20 69 | 73 20 61 6c 6c 20 61 62 |t this i|s all ab|
|00001bb0| 6f 75 74 2e 0a 0a 37 29 | 20 20 43 68 61 6e 67 65 |out...7)| Change|
|00001bc0| 20 61 6c 6c 20 73 79 73 | 74 65 6d 20 73 6f 75 72 | all sys|tem sour|
|00001bd0| 63 65 73 20 74 68 61 74 | 20 77 65 72 65 20 61 63 |ces that| were ac|
|00001be0| 63 65 73 73 69 6e 67 20 | 64 69 72 65 63 74 6f 72 |cessing |director|
|00001bf0| 69 65 73 20 74 6f 20 75 | 73 65 20 74 68 65 20 6e |ies to u|se the n|
|00001c00| 4d 61 6b 65 66 69 6c 65 | 2e 31 36 00 00 00 00 00 |Makefile|.16.....|
|00001c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c60| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00001c70| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00001c80| 30 30 30 31 30 35 34 20 | 30 34 34 32 35 37 30 37 |0001054 |04425707|
|00001c90| 34 31 34 20 30 30 36 35 | 30 33 00 20 20 00 00 00 |414 0065|03. ...|
|00001ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 23 0a 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.# Make|file for|
|00001e10| 20 4d 69 6e 69 78 20 53 | 54 20 75 73 69 6e 67 20 | Minix S|T using |
|00001e20| 47 6e 75 20 67 63 63 20 | 69 6e 20 31 36 20 62 69 |Gnu gcc |in 16 bi|
|00001e30| 74 20 69 6e 74 65 67 65 | 72 20 6d 6f 64 65 0a 23 |t intege|r mode.#|
|00001e40| 0a 43 52 4f 53 53 44 49 | 52 20 3d 20 2f 64 73 72 |.CROSSDI|R = /dsr|
|00001e50| 67 2f 62 61 6d 6d 69 2f | 63 72 6f 73 73 2d 6d 69 |g/bammi/|cross-mi|
|00001e60| 6e 69 78 0a 43 52 4f 53 | 53 4c 49 42 20 3d 20 24 |nix.CROS|SLIB = $|
|00001e70| 28 43 52 4f 53 53 44 49 | 52 29 2f 6c 69 62 0a 43 |(CROSSDI|R)/lib.C|
|00001e80| 52 4f 53 53 42 49 4e 20 | 3d 20 24 28 43 52 4f 53 |ROSSBIN |= $(CROS|
|00001e90| 53 44 49 52 29 2f 62 69 | 6e 0a 0a 43 43 20 3d 20 |SDIR)/bi|n..CC = |
|00001ea0| 24 28 43 52 4f 53 53 42 | 49 4e 29 2f 6d 67 63 63 |$(CROSSB|IN)/mgcc|
|00001eb0| 0a 43 46 4c 41 47 53 20 | 3d 20 2d 6d 73 68 6f 72 |.CFLAGS |= -mshor|
|00001ec0| 74 20 2d 4f 20 2d 44 55 | 46 53 20 2d 44 41 54 41 |t -O -DU|FS -DATA|
|00001ed0| 52 49 5f 53 54 0a 41 52 | 20 3d 20 2f 64 73 72 67 |RI_ST.AR| = /dsrg|
|00001ee0| 2f 62 61 6d 6d 69 2f 63 | 72 6f 73 73 2d 67 63 63 |/bammi/c|ross-gcc|
|00001ef0| 2f 62 69 6e 2f 63 61 72 | 0a 41 52 46 4c 41 47 53 |/bin/car|.ARFLAGS|
|00001f00| 20 3d 20 73 72 76 0a 0a | 4f 42 4a 20 3d 20 63 6c | = srv..|OBJ = cl|
|00001f10| 6f 73 65 64 69 72 2e 6f | 20 6f 70 65 6e 64 69 72 |osedir.o| opendir|
|00001f20| 2e 6f 20 73 65 65 6b 64 | 69 72 2e 6f 20 72 65 61 |.o seekd|ir.o rea|
|00001f30| 64 64 69 72 2e 6f 20 67 | 65 74 64 65 6e 74 73 2e |ddir.o g|etdents.|
|00001f40| 6f 20 72 65 77 69 6e 64 | 64 69 72 2e 6f 20 5c 0a |o rewind|dir.o \.|
|00001f50| 74 65 6c 6c 64 69 72 2e | 6f 0a 0a 41 4c 4c 20 3d |telldir.|o..ALL =|
|00001f60| 20 6c 69 62 64 69 72 2e | 61 0a 0a 61 6c 6c 3a 20 | libdir.|a..all: |
|00001f70| 24 28 41 4c 4c 29 0a 0a | 24 28 41 4c 4c 29 20 3a |$(ALL)..|$(ALL) :|
|00001f80| 20 24 28 4f 42 4a 29 0a | 09 24 28 41 52 29 20 24 | $(OBJ).|.$(AR) $|
|00001f90| 28 41 52 46 4c 41 47 53 | 29 20 24 28 41 4c 4c 29 |(ARFLAGS|) $(ALL)|
|00001fa0| 20 24 28 4f 42 4a 29 0a | 0a 69 6e 73 74 61 6c 6c | $(OBJ).|.install|
|00001fb0| 3a 20 24 28 41 4c 4c 29 | 0a 09 63 70 20 24 28 41 |: $(ALL)|..cp $(A|
|00001fc0| 4c 4c 29 20 24 28 43 52 | 4f 53 53 4c 49 42 29 0a |LL) $(CR|OSSLIB).|
|00001fd0| 0a 63 6c 65 61 6e 3a 0a | 09 72 6d 20 2d 66 20 2a |.clean:.|.rm -f *|
|00001fe0| 2e 6f 20 24 28 41 4c 4c | 29 0a 0a 74 65 73 74 64 |.o $(ALL|)..testd|
|00001ff0| 69 72 3a 20 74 65 73 74 | 64 69 72 2e 6f 20 0a 09 |ir: test|dir.o ..|
|00002000| 24 28 43 43 29 20 2d 6d | 73 68 6f 72 74 20 2d 6f |$(CC) -m|short -o|
|00002010| 20 74 65 73 74 64 69 72 | 20 74 65 73 74 64 69 72 | testdir| testdir|
|00002020| 2e 6f 20 2d 6c 64 69 72 | 20 2d 76 0a 36 20 62 69 |.o -ldir| -v.6 bi|
|00002030| 74 20 69 6e 74 65 67 65 | 72 20 6d 6f 64 65 0a 23 |t intege|r mode.#|
|00002040| 0a 43 52 4f 53 53 44 49 | 52 20 3d 20 2f 64 73 72 |.CROSSDI|R = /dsr|
|00002050| 67 2f 62 61 6d 6d 69 2f | 63 72 6f 73 73 2d 6d 69 |g/bammi/|cross-mi|
|00002060| 6e 69 78 0a 43 52 4f 53 | 53 4c 49 42 20 3d 20 24 |nix.CROS|SLIB = $|
|00002070| 28 43 52 4f 53 53 44 49 | 52 29 2f 6c 69 62 0a 43 |(CROSSDI|R)/lib.C|
|00002080| 52 4f 53 53 42 49 4e 20 | 3d 20 24 28 43 52 4f 53 |ROSSBIN |= $(CROS|
|00002090| 53 44 49 52 29 2f 62 69 | 6e 0a 0a 43 43 20 3d 20 |SDIR)/bi|n..CC = |
|000020a0| 24 28 43 52 4f 53 53 42 | 49 4e 29 2f 6d 67 63 63 |$(CROSSB|IN)/mgcc|
|000020b0| 0a 43 46 4c 41 47 53 20 | 3d 20 2d 6d 73 68 6f 72 |.CFLAGS |= -mshor|
|000020c0| 74 20 2d 4f 20 2d 44 55 | 46 53 20 2d 44 41 54 41 |t -O -DU|FS -DATA|
|000020d0| 52 49 5f 53 54 0a 41 52 | 20 3d 20 2f 64 73 72 67 |RI_ST.AR| = /dsrg|
|000020e0| 2f 62 61 6d 6d 69 2f 63 | 72 6f 73 73 2d 67 63 63 |/bammi/c|ross-gcc|
|000020f0| 2f 62 69 6e 2f 63 61 72 | 0a 41 52 46 4c 41 47 53 |/bin/car|.ARFLAGS|
|00002100| 20 3d 20 73 72 76 0a 0a | 4f 42 4a 20 3d 20 63 6c | = srv..|OBJ = cl|
|00002110| 6f 73 65 64 69 72 2e 6f | 20 6f 70 65 6e 64 69 72 |osedir.o| opendir|
|00002120| 2e 6f 20 73 65 65 6b 64 | 69 72 2e 6f 20 72 65 61 |.o seekd|ir.o rea|
|00002130| 64 64 69 72 2e 6f 20 67 | 65 74 64 65 6e 74 73 2e |ddir.o g|etdents.|
|00002140| 6f 20 72 65 77 69 6e 64 | 64 69 72 2e 6f 20 5c 0a |o rewind|dir.o \.|
|00002150| 74 65 6c 6c 64 69 72 2e | 6f 0a 0a 41 4c 4c 20 3d |telldir.|o..ALL =|
|00002160| 20 6c 69 62 64 69 72 2e | 61 0a 0a 61 6c 6c 3a 20 | libdir.|a..all: |
|00002170| 24 28 41 4c 4c 29 0a 0a | 24 28 41 4c 4c 29 20 3a |$(ALL)..|$(ALL) :|
|00002180| 20 24 28 4f 42 4a 29 0a | 09 24 28 41 52 29 20 24 | $(OBJ).|.$(AR) $|
|00002190| 28 41 52 46 4c 41 47 53 | 29 20 24 28 41 4c 4c 29 |(ARFLAGS|) $(ALL)|
|000021a0| 20 24 28 4f 42 4a 29 0a | 0a 69 6e 73 74 61 6c 6c | $(OBJ).|.install|
|000021b0| 3a 20 24 28 41 4c 4c 29 | 0a 09 63 70 20 24 28 41 |: $(ALL)|..cp $(A|
|000021c0| 4c 4c 29 20 24 28 43 52 | 4f 53 53 4c 49 42 29 0a |LL) $(CR|OSSLIB).|
|000021d0| 0a 63 6c 65 61 6e 3a 0a | 09 72 6d 20 2d 66 20 2a |.clean:.|.rm -f *|
|000021e0| 2e 6f 20 24 28 41 4c 4c | 29 0a 0a 74 65 73 74 64 |.o $(ALL|)..testd|
|000021f0| 69 72 3a 20 74 65 73 74 | 64 69 72 2e 6f 20 0a 09 |ir: test|dir.o ..|
|00002200| 4d 61 6b 65 66 69 6c 65 | 2e 33 32 00 00 00 00 00 |Makefile|.32.....|
|00002210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00002270| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00002280| 30 30 30 31 30 34 33 20 | 30 34 34 32 35 37 30 37 |0001043 |04425707|
|00002290| 34 31 34 20 30 30 36 34 | 37 37 00 20 20 00 00 00 |414 0064|77. ...|
|000022a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 23 0a 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.# Make|file for|
|00002410| 20 4d 69 6e 69 78 20 53 | 54 20 75 73 69 6e 67 20 | Minix S|T using |
|00002420| 47 6e 75 20 67 63 63 20 | 69 6e 20 33 32 20 62 69 |Gnu gcc |in 32 bi|
|00002430| 74 20 69 6e 74 65 67 65 | 72 20 6d 6f 64 65 0a 23 |t intege|r mode.#|
|00002440| 0a 43 52 4f 53 53 44 49 | 52 20 3d 20 2f 64 73 72 |.CROSSDI|R = /dsr|
|00002450| 67 2f 62 61 6d 6d 69 2f | 63 72 6f 73 73 2d 6d 69 |g/bammi/|cross-mi|
|00002460| 6e 69 78 0a 43 52 4f 53 | 53 4c 49 42 20 3d 20 24 |nix.CROS|SLIB = $|
|00002470| 28 43 52 4f 53 53 44 49 | 52 29 2f 6c 69 62 0a 43 |(CROSSDI|R)/lib.C|
|00002480| 52 4f 53 53 42 49 4e 20 | 3d 20 24 28 43 52 4f 53 |ROSSBIN |= $(CROS|
|00002490| 53 44 49 52 29 2f 62 69 | 6e 0a 0a 43 43 20 3d 20 |SDIR)/bi|n..CC = |
|000024a0| 24 28 43 52 4f 53 53 42 | 49 4e 29 2f 6d 67 63 63 |$(CROSSB|IN)/mgcc|
|000024b0| 0a 43 46 4c 41 47 53 20 | 3d 20 2d 4f 20 2d 44 55 |.CFLAGS |= -O -DU|
|000024c0| 46 53 20 2d 44 41 54 41 | 52 49 5f 53 54 0a 41 52 |FS -DATA|RI_ST.AR|
|000024d0| 20 3d 20 2f 64 73 72 67 | 2f 62 61 6d 6d 69 2f 63 | = /dsrg|/bammi/c|
|000024e0| 72 6f 73 73 2d 67 63 63 | 2f 62 69 6e 2f 63 61 72 |ross-gcc|/bin/car|
|000024f0| 0a 41 52 46 4c 41 47 53 | 20 3d 20 73 72 76 0a 0a |.ARFLAGS| = srv..|
|00002500| 4f 42 4a 20 3d 20 63 6c | 6f 73 65 64 69 72 2e 6f |OBJ = cl|osedir.o|
|00002510| 20 6f 70 65 6e 64 69 72 | 2e 6f 20 73 65 65 6b 64 | opendir|.o seekd|
|00002520| 69 72 2e 6f 20 72 65 61 | 64 64 69 72 2e 6f 20 67 |ir.o rea|ddir.o g|
|00002530| 65 74 64 65 6e 74 73 2e | 6f 20 72 65 77 69 6e 64 |etdents.|o rewind|
|00002540| 64 69 72 2e 6f 20 5c 0a | 74 65 6c 6c 64 69 72 2e |dir.o \.|telldir.|
|00002550| 6f 0a 0a 41 4c 4c 20 3d | 20 6c 69 62 64 69 72 33 |o..ALL =| libdir3|
|00002560| 32 2e 61 0a 0a 61 6c 6c | 3a 20 24 28 41 4c 4c 29 |2.a..all|: $(ALL)|
|00002570| 0a 0a 24 28 41 4c 4c 29 | 20 3a 20 24 28 4f 42 4a |..$(ALL)| : $(OBJ|
|00002580| 29 0a 09 24 28 41 52 29 | 20 24 28 41 52 46 4c 41 |)..$(AR)| $(ARFLA|
|00002590| 47 53 29 20 24 28 41 4c | 4c 29 20 24 28 4f 42 4a |GS) $(AL|L) $(OBJ|
|000025a0| 29 0a 0a 69 6e 73 74 61 | 6c 6c 3a 20 24 28 41 4c |)..insta|ll: $(AL|
|000025b0| 4c 29 0a 09 63 70 20 24 | 28 41 4c 4c 29 20 24 28 |L)..cp $|(ALL) $(|
|000025c0| 43 52 4f 53 53 4c 49 42 | 29 0a 0a 63 6c 65 61 6e |CROSSLIB|)..clean|
|000025d0| 3a 0a 09 72 6d 20 2d 66 | 20 2a 2e 6f 20 24 28 41 |:..rm -f| *.o $(A|
|000025e0| 4c 4c 29 0a 0a 74 65 73 | 74 64 69 72 33 32 3a 20 |LL)..tes|tdir32: |
|000025f0| 74 65 73 74 64 69 72 2e | 6f 0a 09 24 28 43 43 29 |testdir.|o..$(CC)|
|00002600| 20 2d 6f 20 74 65 73 74 | 64 69 72 33 32 20 74 65 | -o test|dir32 te|
|00002610| 73 74 64 69 72 2e 6f 20 | 2d 6c 64 69 72 33 32 20 |stdir.o |-ldir32 |
|00002620| 2d 76 0a 20 67 63 63 20 | 69 6e 20 33 32 20 62 69 |-v. gcc |in 32 bi|
|00002630| 74 20 69 6e 74 65 67 65 | 72 20 6d 6f 64 65 0a 23 |t intege|r mode.#|
|00002640| 0a 43 52 4f 53 53 44 49 | 52 20 3d 20 2f 64 73 72 |.CROSSDI|R = /dsr|
|00002650| 67 2f 62 61 6d 6d 69 2f | 63 72 6f 73 73 2d 6d 69 |g/bammi/|cross-mi|
|00002660| 6e 69 78 0a 43 52 4f 53 | 53 4c 49 42 20 3d 20 24 |nix.CROS|SLIB = $|
|00002670| 28 43 52 4f 53 53 44 49 | 52 29 2f 6c 69 62 0a 43 |(CROSSDI|R)/lib.C|
|00002680| 52 4f 53 53 42 49 4e 20 | 3d 20 24 28 43 52 4f 53 |ROSSBIN |= $(CROS|
|00002690| 53 44 49 52 29 2f 62 69 | 6e 0a 0a 43 43 20 3d 20 |SDIR)/bi|n..CC = |
|000026a0| 24 28 43 52 4f 53 53 42 | 49 4e 29 2f 6d 67 63 63 |$(CROSSB|IN)/mgcc|
|000026b0| 0a 43 46 4c 41 47 53 20 | 3d 20 2d 4f 20 2d 44 55 |.CFLAGS |= -O -DU|
|000026c0| 46 53 20 2d 44 41 54 41 | 52 49 5f 53 54 0a 41 52 |FS -DATA|RI_ST.AR|
|000026d0| 20 3d 20 2f 64 73 72 67 | 2f 62 61 6d 6d 69 2f 63 | = /dsrg|/bammi/c|
|000026e0| 72 6f 73 73 2d 67 63 63 | 2f 62 69 6e 2f 63 61 72 |ross-gcc|/bin/car|
|000026f0| 0a 41 52 46 4c 41 47 53 | 20 3d 20 73 72 76 0a 0a |.ARFLAGS| = srv..|
|00002700| 4f 42 4a 20 3d 20 63 6c | 6f 73 65 64 69 72 2e 6f |OBJ = cl|osedir.o|
|00002710| 20 6f 70 65 6e 64 69 72 | 2e 6f 20 73 65 65 6b 64 | opendir|.o seekd|
|00002720| 69 72 2e 6f 20 72 65 61 | 64 64 69 72 2e 6f 20 67 |ir.o rea|ddir.o g|
|00002730| 65 74 64 65 6e 74 73 2e | 6f 20 72 65 77 69 6e 64 |etdents.|o rewind|
|00002740| 64 69 72 2e 6f 20 5c 0a | 74 65 6c 6c 64 69 72 2e |dir.o \.|telldir.|
|00002750| 6f 0a 0a 41 4c 4c 20 3d | 20 6c 69 62 64 69 72 33 |o..ALL =| libdir3|
|00002760| 32 2e 61 0a 0a 61 6c 6c | 3a 20 24 28 41 4c 4c 29 |2.a..all|: $(ALL)|
|00002770| 0a 0a 24 28 41 4c 4c 29 | 20 3a 20 24 28 4f 42 4a |..$(ALL)| : $(OBJ|
|00002780| 29 0a 09 24 28 41 52 29 | 20 24 28 41 52 46 4c 41 |)..$(AR)| $(ARFLA|
|00002790| 47 53 29 20 24 28 41 4c | 4c 29 20 24 28 4f 42 4a |GS) $(AL|L) $(OBJ|
|000027a0| 29 0a 0a 69 6e 73 74 61 | 6c 6c 3a 20 24 28 41 4c |)..insta|ll: $(AL|
|000027b0| 4c 29 0a 09 63 70 20 24 | 28 41 4c 4c 29 20 24 28 |L)..cp $|(ALL) $(|
|000027c0| 43 52 4f 53 53 4c 49 42 | 29 0a 0a 63 6c 65 61 6e |CROSSLIB|)..clean|
|000027d0| 3a 0a 09 72 6d 20 2d 66 | 20 2a 2e 6f 20 24 28 41 |:..rm -f| *.o $(A|
|000027e0| 4c 4c 29 0a 0a 74 65 73 | 74 64 69 72 33 32 3a 20 |LL)..tes|tdir32: |
|000027f0| 74 65 73 74 64 69 72 2e | 6f 0a 09 24 28 43 43 29 |testdir.|o..$(CC)|
|00002800| 4e 4f 54 45 53 00 00 00 | 00 00 00 00 00 00 00 00 |NOTES...|........|
|00002810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00002870| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00002880| 30 30 31 32 33 30 32 20 | 30 34 34 32 35 37 30 37 |0012302 |04425707|
|00002890| 34 31 34 20 30 30 35 34 | 32 37 00 20 20 00 00 00 |414 0054|27. ...|
|000028a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a00| 0a 0a 4e 4f 54 45 53 20 | 46 4f 52 20 4e 45 41 52 |..NOTES |FOR NEAR|
|00002a10| 4c 59 2d 50 4f 53 49 58 | 2d 43 4f 4d 50 41 54 49 |LY-POSIX|-COMPATI|
|00002a20| 42 4c 45 20 43 20 4c 49 | 42 52 41 52 59 20 44 49 |BLE C LI|BRARY DI|
|00002a30| 52 45 43 54 4f 52 59 2d | 41 43 43 45 53 53 20 52 |RECTORY-|ACCESS R|
|00002a40| 4f 55 54 49 4e 45 53 0a | 0a 0a 4f 6c 64 65 72 20 |OUTINES.|..Older |
|00002a50| 55 4e 49 58 20 43 20 6c | 69 62 72 61 72 69 65 73 |UNIX C l|ibraries|
|00002a60| 20 6c 61 63 6b 65 64 20 | 73 75 70 70 6f 72 74 20 | lacked |support |
|00002a70| 66 6f 72 20 72 65 61 64 | 69 6e 67 20 64 69 72 65 |for read|ing dire|
|00002a80| 63 74 6f 72 69 65 73 2c | 20 73 6f 20 68 69 73 74 |ctories,| so hist|
|00002a90| 6f 72 69 63 61 6c 6c 79 | 0a 70 72 6f 67 72 61 6d |orically|.program|
|00002aa0| 73 20 68 61 64 20 6b 6e | 6f 77 6c 65 64 67 65 20 |s had kn|owledge |
|00002ab0| 6f 66 20 55 4e 49 58 20 | 64 69 72 65 63 74 6f 72 |of UNIX |director|
|00002ac0| 79 20 73 74 72 75 63 74 | 75 72 65 20 68 61 72 64 |y struct|ure hard|
|00002ad0| 2d 63 6f 64 65 64 20 69 | 6e 74 6f 20 74 68 65 6d |-coded i|nto them|
|00002ae0| 2e 20 20 57 68 65 6e 0a | 42 65 72 6b 65 6c 65 79 |. When.|Berkeley|
|00002af0| 20 63 68 61 6e 67 65 64 | 20 74 68 65 20 66 6f 72 | changed| the for|
|00002b00| 6d 61 74 20 6f 66 20 64 | 69 72 65 63 74 6f 72 69 |mat of d|irectori|
|00002b10| 65 73 20 66 6f 72 20 34 | 2e 32 42 53 44 2c 20 69 |es for 4|.2BSD, i|
|00002b20| 74 20 62 65 63 61 6d 65 | 20 6e 65 63 65 73 73 61 |t became| necessa|
|00002b30| 72 79 20 74 6f 0a 63 68 | 61 6e 67 65 20 70 72 6f |ry to.ch|ange pro|
|00002b40| 67 72 61 6d 73 20 74 6f | 20 77 6f 72 6b 20 77 69 |grams to| work wi|
|00002b50| 74 68 20 74 68 65 20 6e | 65 77 20 73 74 72 75 63 |th the n|ew struc|
|00002b60| 74 75 72 65 2e 20 20 46 | 6f 72 74 75 6e 61 74 65 |ture. F|ortunate|
|00002b70| 6c 79 2c 20 42 65 72 6b | 65 6c 65 79 20 64 65 73 |ly, Berk|eley des|
|00002b80| 69 67 6e 65 64 0a 61 20 | 73 6d 61 6c 6c 20 73 65 |igned.a |small se|
|00002b90| 74 20 6f 66 20 64 69 72 | 65 63 74 6f 72 79 20 61 |t of dir|ectory a|
|00002ba0| 63 63 65 73 73 20 72 6f | 75 74 69 6e 65 73 20 74 |ccess ro|utines t|
|00002bb0| 6f 20 65 6e 63 61 70 73 | 75 6c 61 74 65 20 6b 6e |o encaps|ulate kn|
|00002bc0| 6f 77 6c 65 64 67 65 20 | 6f 66 20 74 68 65 20 6e |owledge |of the n|
|00002bd0| 65 77 0a 64 69 72 65 63 | 74 6f 72 79 20 66 6f 72 |ew.direc|tory for|
|00002be0| 6d 61 74 20 73 6f 20 74 | 68 61 74 20 75 73 65 72 |mat so t|hat user|
|00002bf0| 20 70 72 6f 67 72 61 6d | 73 20 63 6f 75 6c 64 20 | program|s could |
|00002c00| 64 65 61 6c 20 77 69 74 | 68 20 64 69 72 65 63 74 |deal wit|h direct|
|00002c10| 6f 72 79 20 65 6e 74 72 | 69 65 73 20 61 73 20 61 |ory entr|ies as a|
|00002c20| 6e 0a 61 62 73 74 72 61 | 63 74 20 64 61 74 61 20 |n.abstra|ct data |
|00002c30| 74 79 70 65 2e 20 20 28 | 55 6e 66 6f 72 74 75 6e |type. (|Unfortun|
|00002c40| 61 74 65 6c 79 2c 20 74 | 68 65 79 20 64 69 64 6e |ately, t|hey didn|
|00002c50| 27 74 20 67 65 74 20 69 | 74 20 71 75 69 74 65 20 |'t get i|t quite |
|00002c60| 72 69 67 68 74 2e 29 20 | 20 54 68 65 0a 69 6e 74 |right.) | The.int|
|00002c70| 65 72 66 61 63 65 20 74 | 6f 20 74 68 65 73 65 20 |erface t|o these |
|00002c80| 72 6f 75 74 69 6e 65 73 | 20 77 61 73 20 6e 65 61 |routines| was nea|
|00002c90| 72 6c 79 20 69 6e 64 65 | 70 65 6e 64 65 6e 74 20 |rly inde|pendent |
|00002ca0| 6f 66 20 74 68 65 20 70 | 61 72 74 69 63 75 6c 61 |of the p|articula|
|00002cb0| 72 0a 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |r.implem|entation|
|00002cc0| 20 6f 66 20 64 69 72 65 | 63 74 6f 72 69 65 73 20 | of dire|ctories |
|00002cd0| 6f 6e 20 61 6e 79 20 67 | 69 76 65 6e 20 55 4e 49 |on any g|iven UNI|
|00002ce0| 58 20 73 79 73 74 65 6d | 3b 20 74 68 69 73 20 68 |X system|; this h|
|00002cf0| 61 73 20 62 65 63 6f 6d | 65 20 61 0a 70 61 72 74 |as becom|e a.part|
|00002d00| 69 63 75 6c 61 72 6c 79 | 20 69 6d 70 6f 72 74 61 |icularly| importa|
|00002d10| 6e 74 20 72 65 71 75 69 | 72 65 6d 65 6e 74 20 77 |nt requi|rement w|
|00002d20| 69 74 68 20 74 68 65 20 | 61 64 76 65 6e 74 20 6f |ith the |advent o|
|00002d30| 66 20 68 65 74 65 72 6f | 67 65 6e 65 6f 75 73 20 |f hetero|geneous |
|00002d40| 6e 65 74 77 6f 72 6b 0a | 66 69 6c 65 73 79 73 74 |network.|filesyst|
|00002d50| 65 6d 73 20 73 75 63 68 | 20 61 73 20 4e 46 53 2e |ems such| as NFS.|
|00002d60| 0a 0a 49 74 20 68 61 73 | 20 63 6f 6e 73 65 71 75 |..It has| consequ|
|00002d70| 65 6e 74 6c 79 20 62 65 | 63 6f 6d 65 20 70 6f 73 |ently be|come pos|
|00002d80| 73 69 62 6c 65 20 74 6f | 20 77 72 69 74 65 20 70 |sible to| write p|
|00002d90| 6f 72 74 61 62 6c 65 20 | 61 70 70 6c 69 63 61 74 |ortable |applicat|
|00002da0| 69 6f 6e 73 20 74 68 61 | 74 20 73 65 61 72 63 68 |ions tha|t search|
|00002db0| 0a 64 69 72 65 63 74 6f | 72 69 65 73 20 62 79 20 |.directo|ries by |
|00002dc0| 72 65 73 74 72 69 63 74 | 69 6e 67 20 61 6c 6c 20 |restrict|ing all |
|00002dd0| 64 69 72 65 63 74 6f 72 | 79 20 61 63 63 65 73 73 |director|y access|
|00002de0| 20 74 6f 20 75 73 65 20 | 74 68 65 73 65 20 6e 65 | to use |these ne|
|00002df0| 77 20 69 6e 74 65 72 66 | 61 63 65 0a 72 6f 75 74 |w interf|ace.rout|
|00002e00| 69 6e 65 73 2e 20 20 54 | 68 65 20 73 6f 75 72 63 |ines. T|he sourc|
|00002e10| 65 73 20 73 75 70 70 6c | 69 65 64 20 68 65 72 65 |es suppl|ied here|
|00002e20| 20 61 72 65 20 61 20 74 | 6f 74 61 6c 20 72 65 77 | are a t|otal rew|
|00002e30| 72 69 74 65 20 6f 66 20 | 42 65 72 6b 65 6c 65 79 |rite of |Berkeley|
|00002e40| 27 73 20 63 6f 64 65 2c | 0a 69 6e 63 6f 72 70 6f |'s code,|.incorpo|
|00002e50| 72 61 74 69 6e 67 20 69 | 64 65 61 73 20 66 72 6f |rating i|deas fro|
|00002e60| 6d 20 61 20 76 61 72 69 | 65 74 79 20 6f 66 20 73 |m a vari|ety of s|
|00002e70| 6f 75 72 63 65 73 20 61 | 6e 64 20 63 6f 6e 66 6f |ources a|nd confo|
|00002e80| 72 6d 69 6e 67 20 61 73 | 20 63 6c 6f 73 65 6c 79 |rming as| closely|
|00002e90| 20 74 6f 0a 70 75 62 6c | 69 73 68 65 64 20 73 74 | to.publ|ished st|
|00002ea0| 61 6e 64 61 72 64 73 20 | 61 73 20 70 6f 73 73 69 |andards |as possi|
|00002eb0| 62 6c 65 2c 20 61 6e 64 | 20 61 72 65 20 69 6e 20 |ble, and| are in |
|00002ec0| 74 68 65 20 50 55 42 4c | 49 43 20 44 4f 4d 41 49 |the PUBL|IC DOMAI|
|00002ed0| 4e 20 74 6f 20 65 6e 63 | 6f 75 72 61 67 65 0a 74 |N to enc|ourage.t|
|00002ee0| 68 65 69 72 20 77 69 64 | 65 73 70 72 65 61 64 20 |heir wid|espread |
|00002ef0| 61 64 6f 70 74 69 6f 6e | 2e 20 20 54 68 65 79 20 |adoption|. They |
|00002f00| 73 75 70 70 6f 72 74 20 | 66 6f 75 72 20 6d 65 74 |support |four met|
|00002f10| 68 6f 64 73 20 6f 66 20 | 61 63 63 65 73 73 20 74 |hods of |access t|
|00002f20| 6f 20 73 79 73 74 65 6d | 0a 64 69 72 65 63 74 6f |o system|.directo|
|00002f30| 72 69 65 73 3a 20 74 68 | 65 20 6f 72 69 67 69 6e |ries: th|e origin|
|00002f40| 61 6c 20 55 4e 49 58 20 | 66 69 6c 65 73 79 73 74 |al UNIX |filesyst|
|00002f50| 65 6d 20 76 69 61 20 72 | 65 61 64 28 29 2c 20 74 |em via r|ead(), t|
|00002f60| 68 65 20 34 2e 32 42 53 | 44 20 66 69 6c 65 73 79 |he 4.2BS|D filesy|
|00002f70| 73 74 65 6d 20 76 69 61 | 0a 72 65 61 64 28 29 2c |stem via|.read(),|
|00002f80| 20 4e 46 53 20 61 6e 64 | 20 6e 61 74 69 76 65 20 | NFS and| native |
|00002f90| 66 69 6c 65 73 79 73 74 | 65 6d 73 20 76 69 61 20 |filesyst|ems via |
|00002fa0| 67 65 74 64 69 72 65 6e | 74 72 69 65 73 28 29 2c |getdiren|tries(),|
|00002fb0| 20 61 6e 64 20 53 56 52 | 33 20 67 65 74 64 65 6e | and SVR|3 getden|
|00002fc0| 74 73 28 29 2e 0a 54 68 | 65 20 6f 74 68 65 72 20 |ts()..Th|e other |
|00002fd0| 74 68 72 65 65 20 74 79 | 70 65 73 20 61 72 65 20 |three ty|pes are |
|00002fe0| 61 63 63 6f 6d 70 6c 69 | 73 68 65 64 20 62 79 20 |accompli|shed by |
|00002ff0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 65 6d 75 6c |appropri|ate emul|
|00003000| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 53 56 52 |ation of| the SVR|
|00003010| 33 0a 67 65 74 64 65 6e | 74 73 28 29 20 73 79 73 |3.getden|ts() sys|
|00003020| 74 65 6d 20 63 61 6c 6c | 2c 20 77 68 69 63 68 20 |tem call|, which |
|00003030| 61 74 74 61 69 6e 73 20 | 70 6f 72 74 61 62 69 6c |attains |portabil|
|00003040| 69 74 79 20 61 74 20 74 | 68 65 20 63 6f 73 74 20 |ity at t|he cost |
|00003050| 6f 66 20 73 6c 69 67 68 | 74 6c 79 20 6d 6f 72 65 |of sligh|tly more|
|00003060| 0a 64 61 74 61 20 6d 6f | 76 65 6d 65 6e 74 20 74 |.data mo|vement t|
|00003070| 68 61 6e 20 61 62 73 6f | 6c 75 74 65 6c 79 20 6e |han abso|lutely n|
|00003080| 65 63 65 73 73 61 72 79 | 20 66 6f 72 20 73 6f 6d |ecessary| for som|
|00003090| 65 20 73 79 73 74 65 6d | 73 2e 20 20 54 68 65 73 |e system|s. Thes|
|000030a0| 65 20 72 6f 75 74 69 6e | 65 73 0a 73 68 6f 75 6c |e routin|es.shoul|
|000030b0| 64 20 62 65 20 61 64 64 | 65 64 20 74 6f 20 74 68 |d be add|ed to th|
|000030c0| 65 20 73 74 61 6e 64 61 | 72 64 20 43 20 6c 69 62 |e standa|rd C lib|
|000030d0| 72 61 72 79 20 6f 6e 20 | 61 6c 6c 20 55 4e 49 58 |rary on |all UNIX|
|000030e0| 20 73 79 73 74 65 6d 73 | 2c 20 61 6e 64 20 61 6c | systems|, and al|
|000030f0| 6c 20 65 78 69 73 74 69 | 6e 67 0a 61 6e 64 20 66 |l existi|ng.and f|
|00003100| 75 74 75 72 65 20 61 70 | 70 6c 69 63 61 74 69 6f |uture ap|plicatio|
|00003110| 6e 73 20 73 68 6f 75 6c | 64 20 62 65 20 63 68 61 |ns shoul|d be cha|
|00003120| 6e 67 65 64 20 74 6f 20 | 75 73 65 20 74 68 69 73 |nged to |use this|
|00003130| 20 69 6e 74 65 72 66 61 | 63 65 2e 20 20 4f 6e 63 | interfa|ce. Onc|
|00003140| 65 20 74 68 69 73 20 69 | 73 0a 64 6f 6e 65 2c 20 |e this i|s.done, |
|00003150| 74 68 65 72 65 20 73 68 | 6f 75 6c 64 20 62 65 20 |there sh|ould be |
|00003160| 6e 6f 20 70 6f 72 74 61 | 62 69 6c 69 74 79 20 70 |no porta|bility p|
|00003170| 72 6f 62 6c 65 6d 73 20 | 64 75 65 20 74 6f 20 64 |roblems |due to d|
|00003180| 69 66 66 65 72 65 6e 63 | 65 73 20 69 6e 20 75 6e |ifferenc|es in un|
|00003190| 64 65 72 6c 79 69 6e 67 | 0a 64 69 72 65 63 74 6f |derlying|.directo|
|000031a0| 72 79 20 73 74 72 75 63 | 74 75 72 65 73 20 61 6d |ry struc|tures am|
|000031b0| 6f 6e 67 20 55 4e 49 58 | 20 73 79 73 74 65 6d 73 |ong UNIX| systems|
|000031c0| 2e 20 20 28 57 68 65 6e | 20 70 6f 72 74 69 6e 67 |. (When| porting|
|000031d0| 20 79 6f 75 72 20 61 70 | 70 6c 69 63 61 74 69 6f | your ap|plicatio|
|000031e0| 6e 73 20 74 6f 0a 6f 74 | 68 65 72 20 55 4e 49 58 |ns to.ot|her UNIX|
|000031f0| 20 73 79 73 74 65 6d 73 | 2c 20 79 6f 75 20 63 61 | systems|, you ca|
|00003200| 6e 20 61 6c 77 61 79 73 | 20 63 61 72 72 79 20 74 |n always| carry t|
|00003210| 68 69 73 20 70 61 63 6b | 61 67 65 20 61 72 6f 75 |his pack|age arou|
|00003220| 6e 64 20 77 69 74 68 20 | 79 6f 75 2e 29 0a 0a 41 |nd with |you.)..A|
|00003230| 6e 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 62 65 6e |n additi|onal ben|
|00003240| 65 66 69 74 20 6f 66 20 | 74 68 65 73 65 20 72 6f |efit of |these ro|
|00003250| 75 74 69 6e 65 73 20 69 | 73 20 74 68 61 74 20 74 |utines i|s that t|
|00003260| 68 65 79 20 62 75 66 66 | 65 72 20 64 69 72 65 63 |hey buff|er direc|
|00003270| 74 6f 72 79 20 69 6e 70 | 75 74 2c 0a 77 68 69 63 |tory inp|ut,.whic|
|00003280| 68 20 70 72 6f 76 69 64 | 65 73 20 69 6d 70 72 6f |h provid|es impro|
|00003290| 76 65 64 20 61 63 63 65 | 73 73 20 73 70 65 65 64 |ved acce|ss speed|
|000032a0| 20 6f 76 65 72 20 72 61 | 77 20 72 65 61 64 28 29 | over ra|w read()|
|000032b0| 73 20 6f 66 20 6f 6e 65 | 20 65 6e 74 72 79 20 61 |s of one| entry a|
|000032c0| 74 20 61 20 74 69 6d 65 | 2e 0a 0a 4f 6e 65 20 61 |t a time|...One a|
|000032d0| 6e 6e 6f 79 69 6e 67 20 | 63 6f 6d 70 61 74 69 62 |nnoying |compatib|
|000032e0| 69 6c 69 74 79 20 70 72 | 6f 62 6c 65 6d 20 68 61 |ility pr|oblem ha|
|000032f0| 73 20 61 72 69 73 65 6e | 20 61 6c 6f 6e 67 20 74 |s arisen| along t|
|00003300| 68 65 20 77 61 79 2c 20 | 6e 61 6d 65 6c 79 20 74 |he way, |namely t|
|00003310| 68 61 74 20 74 68 65 0a | 6f 72 69 67 69 6e 61 6c |hat the.|original|
|00003320| 20 42 65 72 6b 65 6c 65 | 79 20 69 6e 74 65 72 66 | Berkele|y interf|
|00003330| 61 63 65 20 75 73 65 64 | 20 74 68 65 20 73 61 6d |ace used| the sam|
|00003340| 65 20 6e 61 6d 65 2c 20 | 73 74 72 75 63 74 20 64 |e name, |struct d|
|00003350| 69 72 65 63 74 2c 20 66 | 6f 72 20 74 68 65 20 6e |irect, f|or the n|
|00003360| 65 77 20 64 61 74 61 0a | 73 74 72 75 63 74 75 72 |ew data.|structur|
|00003370| 65 20 61 73 20 68 61 64 | 20 62 65 65 6e 20 75 73 |e as had| been us|
|00003380| 65 64 20 66 6f 72 20 74 | 68 65 20 6f 72 69 67 69 |ed for t|he origi|
|00003390| 6e 61 6c 20 55 4e 49 58 | 20 66 69 6c 65 73 79 73 |nal UNIX| filesys|
|000033a0| 74 65 6d 20 64 69 72 65 | 63 74 6f 72 79 20 72 65 |tem dire|ctory re|
|000033b0| 63 6f 72 64 0a 73 74 72 | 75 63 74 75 72 65 2e 20 |cord.str|ucture. |
|000033c0| 20 54 68 69 73 20 6e 61 | 6d 65 20 77 61 73 20 63 | This na|me was c|
|000033d0| 68 61 6e 67 65 64 20 62 | 79 20 74 68 65 20 49 45 |hanged b|y the IE|
|000033e0| 45 45 20 31 30 30 33 2e | 31 20 28 50 4f 53 49 58 |EE 1003.|1 (POSIX|
|000033f0| 29 20 57 6f 72 6b 69 6e | 67 20 47 72 6f 75 70 20 |) Workin|g Group |
|00003400| 74 6f 0a 22 73 74 72 75 | 63 74 20 64 69 72 65 6e |to."stru|ct diren|
|00003410| 74 22 20 61 6e 64 20 77 | 61 73 20 70 69 63 6b 65 |t" and w|as picke|
|00003420| 64 20 75 70 20 66 6f 72 | 20 53 56 52 33 20 75 6e |d up for| SVR3 un|
|00003430| 64 65 72 20 74 68 65 20 | 6e 65 77 20 6e 61 6d 65 |der the |new name|
|00003440| 3b 20 69 74 20 69 73 20 | 61 6c 73 6f 20 74 68 65 |; it is |also the|
|00003450| 0a 6e 61 6d 65 20 75 73 | 65 64 20 69 6e 20 74 68 |.name us|ed in th|
|00003460| 69 73 20 70 6f 72 74 61 | 62 6c 65 20 70 61 63 6b |is porta|ble pack|
|00003470| 61 67 65 2e 20 20 49 20 | 62 65 6c 69 65 76 65 20 |age. I |believe |
|00003480| 69 74 20 69 73 20 6e 65 | 63 65 73 73 61 72 79 20 |it is ne|cessary |
|00003490| 74 6f 20 62 69 74 65 20 | 74 68 65 0a 62 75 6c 6c |to bite |the.bull|
|000034a0| 65 74 20 61 6e 64 20 61 | 64 6f 70 74 20 74 68 65 |et and a|dopt the|
|000034b0| 20 6e 65 77 20 6e 6f 6e | 2d 63 6f 6e 66 6c 69 63 | new non|-conflic|
|000034c0| 74 69 6e 67 20 6e 61 6d | 65 2e 20 20 43 6f 64 65 |ting nam|e. Code|
|000034d0| 20 75 73 69 6e 67 20 61 | 20 34 2e 32 42 53 44 2d | using a| 4.2BSD-|
|000034e0| 63 6f 6d 70 61 74 69 62 | 6c 65 0a 70 61 63 6b 61 |compatib|le.packa|
|000034f0| 67 65 20 6e 65 65 64 73 | 20 74 6f 20 62 65 20 73 |ge needs| to be s|
|00003500| 6c 69 67 68 74 6c 79 20 | 72 65 76 69 73 65 64 20 |lightly |revised |
|00003510| 74 6f 20 77 6f 72 6b 20 | 77 69 74 68 20 74 68 69 |to work |with thi|
|00003520| 73 20 6e 65 77 20 70 61 | 63 6b 61 67 65 2c 20 61 |s new pa|ckage, a|
|00003530| 73 20 66 6f 6c 6c 6f 77 | 73 3a 0a 09 43 68 61 6e |s follow|s:..Chan|
|00003540| 67 65 0a 09 09 23 69 6e | 63 6c 75 64 65 20 3c 6e |ge...#in|clude <n|
|00003550| 64 69 72 2e 68 3e 09 2f | 2a 20 4e 69 6e 74 68 20 |dir.h>./|* Ninth |
|00003560| 45 64 69 74 69 6f 6e 20 | 55 4e 49 58 20 2a 2f 0a |Edition |UNIX */.|
|00003570| 09 6f 72 0a 09 09 23 69 | 6e 63 6c 75 64 65 20 3c |.or...#i|nclude <|
|00003580| 73 79 73 2f 64 69 72 2e | 68 3e 09 2f 2a 20 34 2e |sys/dir.|h>./* 4.|
|00003590| 32 42 53 44 20 2a 2f 0a | 09 6f 72 0a 09 09 23 69 |2BSD */.|.or...#i|
|000035a0| 6e 63 6c 75 64 65 20 3c | 64 69 72 2e 68 3e 09 2f |nclude <|dir.h>./|
|000035b0| 2a 20 42 52 4c 20 53 79 | 73 74 65 6d 20 56 20 65 |* BRL Sy|stem V e|
|000035c0| 6d 75 6c 61 74 69 6f 6e | 20 2a 2f 0a 09 74 6f 0a |mulation| */..to.|
|000035d0| 09 09 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |..#inclu|de <sys/|
|000035e0| 74 79 70 65 73 2e 68 3e | 09 2f 2a 20 69 66 20 6e |types.h>|./* if n|
|000035f0| 6f 74 20 61 6c 72 65 61 | 64 79 20 23 69 6e 63 6c |ot alrea|dy #incl|
|00003600| 75 64 65 64 20 2a 2f 0a | 09 09 23 69 6e 63 6c 75 |uded */.|..#inclu|
|00003610| 64 65 20 3c 64 69 72 65 | 6e 74 2e 68 3e 0a 0a 09 |de <dire|nt.h>...|
|00003620| 43 68 61 6e 67 65 0a 09 | 09 73 74 72 75 63 74 20 |Change..|.struct |
|00003630| 64 69 72 65 63 74 0a 09 | 74 6f 0a 09 09 73 74 72 |direct..|to...str|
|00003640| 75 63 74 20 64 69 72 65 | 6e 74 0a 0a 09 43 68 61 |uct dire|nt...Cha|
|00003650| 6e 67 65 0a 09 09 28 61 | 6e 79 74 68 69 6e 67 29 |nge...(a|nything)|
|00003660| 2d 3e 64 5f 6e 61 6d 6c | 65 6e 0a 09 74 6f 0a 09 |->d_naml|en..to..|
|00003670| 09 73 74 72 6c 65 6e 28 | 20 28 61 6e 79 74 68 69 |.strlen(| (anythi|
|00003680| 6e 67 29 2d 3e 64 5f 6e | 61 6d 65 20 29 0a 0a 54 |ng)->d_n|ame )..T|
|00003690| 68 65 72 65 20 69 73 20 | 61 20 6d 69 6e 6f 72 20 |here is |a minor |
|000036a0| 63 6f 6d 70 61 74 69 62 | 69 6c 69 74 79 20 70 72 |compatib|ility pr|
|000036b0| 6f 62 6c 65 6d 20 69 6e | 20 74 68 61 74 20 74 68 |oblem in| that th|
|000036c0| 65 20 63 6c 6f 73 65 64 | 69 72 28 29 20 66 75 6e |e closed|ir() fun|
|000036d0| 63 74 69 6f 6e 20 77 61 | 73 0a 6f 72 69 67 69 6e |ction wa|s.origin|
|000036e0| 61 6c 6c 79 20 64 65 66 | 69 6e 65 64 20 74 6f 20 |ally def|ined to |
|000036f0| 68 61 76 65 20 74 79 70 | 65 20 76 6f 69 64 2c 20 |have typ|e void, |
|00003700| 62 75 74 20 49 45 45 45 | 20 31 30 30 33 2e 31 20 |but IEEE| 1003.1 |
|00003710| 63 68 61 6e 67 65 64 20 | 74 68 69 73 20 74 6f 20 |changed |this to |
|00003720| 74 79 70 65 20 69 6e 74 | 2c 0a 77 68 69 63 68 20 |type int|,.which |
|00003730| 69 73 20 77 68 61 74 20 | 74 68 69 73 20 69 6d 70 |is what |this imp|
|00003740| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 73 75 70 70 |lementat|ion supp|
|00003750| 6f 72 74 73 20 28 65 76 | 65 6e 20 74 68 6f 75 67 |orts (ev|en thoug|
|00003760| 68 20 49 20 64 69 73 61 | 67 72 65 65 20 77 69 74 |h I disa|gree wit|
|00003770| 68 20 74 68 65 0a 63 68 | 61 6e 67 65 29 2e 20 20 |h the.ch|ange). |
|00003780| 48 6f 77 65 76 65 72 2c | 20 74 68 65 20 64 69 66 |However,| the dif|
|00003790| 66 65 72 65 6e 63 65 20 | 64 6f 65 73 20 6e 6f 74 |ference |does not|
|000037a0| 20 61 66 66 65 63 74 20 | 6d 6f 73 74 20 61 70 70 | affect |most app|
|000037b0| 6c 69 63 61 74 69 6f 6e | 73 2e 0a 0a 41 6e 6f 74 |lication|s...Anot|
|000037c0| 68 65 72 20 6d 69 6e 6f | 72 20 70 72 6f 62 6c 65 |her mino|r proble|
|000037d0| 6d 20 69 73 20 74 68 61 | 74 20 49 45 45 45 20 31 |m is tha|t IEEE 1|
|000037e0| 30 30 33 2e 31 20 64 65 | 66 69 6e 65 64 20 74 68 |003.1 de|fined th|
|000037f0| 65 20 64 5f 6e 61 6d 65 | 20 6d 65 6d 62 65 72 20 |e d_name| member |
|00003800| 6f 66 20 61 20 73 74 72 | 75 63 74 0a 64 69 72 65 |of a str|uct.dire|
|00003810| 6e 74 20 74 6f 20 62 65 | 20 61 6e 20 61 72 72 61 |nt to be| an arra|
|00003820| 79 20 6f 66 20 6d 61 78 | 69 6d 75 6d 20 6c 65 6e |y of max|imum len|
|00003830| 67 74 68 3b 20 74 68 69 | 73 20 64 6f 65 73 20 6e |gth; thi|s does n|
|00003840| 6f 74 20 70 65 72 6d 69 | 74 20 75 73 65 20 6f 66 |ot permi|t use of|
|00003850| 20 63 6f 6d 70 61 63 74 | 0a 76 61 72 69 61 62 6c | compact|.variabl|
|00003860| 65 2d 6c 65 6e 67 74 68 | 20 65 6e 74 72 69 65 73 |e-length| entries|
|00003870| 20 64 69 72 65 63 74 6c | 79 20 66 72 6f 6d 20 61 | directl|y from a|
|00003880| 20 64 69 72 65 63 74 6f | 72 79 20 62 6c 6f 63 6b | directo|ry block|
|00003890| 20 62 75 66 66 65 72 2e | 20 20 54 68 69 73 20 70 | buffer.| This p|
|000038a0| 61 72 74 20 6f 66 0a 74 | 68 65 20 73 70 65 63 69 |art of.t|he speci|
|000038b0| 66 69 63 61 74 69 6f 6e | 20 69 73 20 69 6e 63 6f |fication| is inco|
|000038c0| 6d 70 61 74 69 62 6c 65 | 20 77 69 74 68 20 65 66 |mpatible| with ef|
|000038d0| 66 69 63 69 65 6e 74 20 | 75 73 65 20 6f 66 20 74 |ficient |use of t|
|000038e0| 68 65 20 67 65 74 64 65 | 6e 74 73 28 29 20 73 79 |he getde|nts() sy|
|000038f0| 73 74 65 6d 0a 63 61 6c | 6c 2c 20 61 6e 64 20 49 |stem.cal|l, and I|
|00003900| 20 68 61 76 65 20 74 68 | 65 72 65 66 6f 72 65 20 | have th|erefore |
|00003910| 63 68 6f 73 65 6e 20 74 | 6f 20 66 6f 6c 6c 6f 77 |chosen t|o follow|
|00003920| 20 74 68 65 20 53 56 49 | 44 20 73 70 65 63 69 66 | the SVI|D specif|
|00003930| 69 63 61 74 69 6f 6e 20 | 69 6e 73 74 65 61 64 20 |ication |instead |
|00003940| 6f 66 0a 49 45 45 45 20 | 31 30 30 33 2e 31 20 28 |of.IEEE |1003.1 (|
|00003950| 77 68 69 63 68 20 49 20 | 68 6f 70 65 20 69 73 20 |which I |hope is |
|00003960| 63 68 61 6e 67 65 64 20 | 66 6f 72 20 74 68 65 20 |changed |for the |
|00003970| 66 69 6e 61 6c 2d 75 73 | 65 20 73 74 61 6e 64 61 |final-us|e standa|
|00003980| 72 64 29 2e 20 20 54 68 | 69 73 0a 64 65 76 69 61 |rd). Th|is.devia|
|00003990| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 68 61 76 65 |tion sho|uld have|
|000039a0| 20 6c 69 74 74 6c 65 20 | 6f 72 20 6e 6f 20 69 6d | little |or no im|
|000039b0| 70 61 63 74 20 6f 6e 20 | 73 65 6e 73 69 62 6c 79 |pact on |sensibly|
|000039c0| 2d 63 6f 64 65 64 20 61 | 70 70 6c 69 63 61 74 69 |-coded a|pplicati|
|000039d0| 6f 6e 73 2c 20 73 69 6e | 63 65 0a 74 68 65 20 72 |ons, sin|ce.the r|
|000039e0| 65 6c 65 76 61 6e 74 20 | 64 5f 6e 61 6d 65 20 6c |elevant |d_name l|
|000039f0| 65 6e 67 74 68 20 69 73 | 20 74 68 61 74 20 67 69 |ength is| that gi|
|00003a00| 76 65 6e 20 62 79 20 73 | 74 72 6c 65 6e 28 29 2c |ven by s|trlen(),|
|00003a10| 20 6e 6f 74 20 74 68 65 | 20 64 65 63 6c 61 72 65 | not the| declare|
|00003a20| 64 20 61 72 72 61 79 0a | 73 69 7a 65 2e 0a 0a 45 |d array.|size...E|
|00003a30| 72 72 6f 72 20 68 61 6e | 64 6c 69 6e 67 20 69 73 |rror han|dling is|
|00003a40| 20 6e 6f 74 20 63 6f 6d | 70 6c 65 74 65 6c 79 20 | not com|pletely |
|00003a50| 73 61 74 69 73 66 61 63 | 74 6f 72 79 2c 20 64 75 |satisfac|tory, du|
|00003a60| 65 20 74 6f 20 74 68 65 | 20 76 61 72 69 65 74 79 |e to the| variety|
|00003a70| 20 6f 66 20 70 6f 73 73 | 69 62 6c 65 0a 66 61 69 | of poss|ible.fai|
|00003a80| 6c 75 72 65 20 6d 6f 64 | 65 73 20 69 6e 20 61 20 |lure mod|es in a |
|00003a90| 67 65 6e 65 72 61 6c 20 | 73 65 74 74 69 6e 67 2e |general |setting.|
|00003aa0| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 | For ex|ample, t|
|00003ab0| 68 65 20 72 65 77 69 6e | 64 64 69 72 28 29 20 66 |he rewin|ddir() f|
|00003ac0| 75 6e 63 74 69 6f 6e 0a | 6d 69 67 68 74 20 66 61 |unction.|might fa|
|00003ad0| 69 6c 2c 20 62 75 74 20 | 74 68 65 72 65 20 69 73 |il, but |there is|
|00003ae0| 20 6e 6f 20 67 6f 6f 64 | 20 77 61 79 20 74 6f 20 | no good| way to |
|00003af0| 69 6e 64 69 63 61 74 65 | 20 74 68 69 73 2e 20 20 |indicate| this. |
|00003b00| 49 20 68 61 76 65 20 74 | 72 69 65 64 20 74 6f 0a |I have t|ried to.|
|00003b10| 66 6f 6c 6c 6f 77 20 74 | 68 65 20 73 70 65 63 69 |follow t|he speci|
|00003b20| 66 69 63 61 74 69 6f 6e | 73 20 69 6e 20 49 45 45 |fication|s in IEE|
|00003b30| 45 20 31 30 30 33 2e 31 | 20 61 6e 64 20 74 68 65 |E 1003.1| and the|
|00003b40| 20 53 56 49 44 20 61 73 | 20 63 6c 6f 73 65 6c 79 | SVID as| closely|
|00003b50| 20 61 73 20 70 6f 73 73 | 69 62 6c 65 2c 0a 62 75 | as poss|ible,.bu|
|00003b60| 74 20 74 68 65 72 65 20 | 61 72 65 20 6d 69 6e 6f |t there |are mino|
|00003b70| 72 20 64 65 76 69 61 74 | 69 6f 6e 73 20 69 6e 20 |r deviat|ions in |
|00003b80| 74 68 69 73 20 72 65 67 | 61 72 64 2e 20 20 41 70 |this reg|ard. Ap|
|00003b90| 70 6c 69 63 61 74 69 6f | 6e 73 20 73 68 6f 75 6c |plicatio|ns shoul|
|00003ba0| 64 20 6e 6f 74 20 72 65 | 6c 79 0a 74 6f 6f 20 68 |d not re|ly.too h|
|00003bb0| 65 61 76 69 6c 79 20 6f | 6e 20 65 78 61 63 74 20 |eavily o|n exact |
|00003bc0| 66 61 69 6c 75 72 65 20 | 6d 6f 64 65 20 73 65 6d |failure |mode sem|
|00003bd0| 61 6e 74 69 63 73 2e 0a | 0a 50 6c 65 61 73 65 20 |antics..|.Please |
|00003be0| 64 6f 20 6e 6f 74 20 63 | 68 61 6e 67 65 20 74 68 |do not c|hange th|
|00003bf0| 65 20 6e 65 77 20 73 74 | 61 6e 64 61 72 64 20 69 |e new st|andard i|
|00003c00| 6e 74 65 72 66 61 63 65 | 20 69 6e 20 61 6e 79 20 |nterface| in any |
|00003c10| 77 61 79 2c 20 61 73 20 | 74 68 61 74 20 77 6f 75 |way, as |that wou|
|00003c20| 6c 64 0a 64 65 66 65 61 | 74 20 74 68 65 20 6d 61 |ld.defea|t the ma|
|00003c30| 6a 6f 72 20 70 75 72 70 | 6f 73 65 20 6f 66 20 74 |jor purp|ose of t|
|00003c40| 68 69 73 20 70 61 63 6b | 61 67 65 21 20 20 28 49 |his pack|age! (I|
|00003c50| 74 27 73 20 6f 6b 61 79 | 20 74 6f 20 61 6c 74 65 |t's okay| to alte|
|00003c60| 72 20 74 68 65 20 69 6e | 74 65 72 6e 61 6c 0a 69 |r the in|ternal.i|
|00003c70| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 69 66 |mplement|ation if|
|00003c80| 20 79 6f 75 20 72 65 61 | 6c 6c 79 20 68 61 76 65 | you rea|lly have|
|00003c90| 20 74 6f 2c 20 61 6c 74 | 68 6f 75 67 68 20 49 20 | to, alt|hough I |
|00003ca0| 74 72 69 65 64 20 74 6f | 20 6d 61 6b 65 20 74 68 |tried to| make th|
|00003cb0| 69 73 20 75 6e 6e 65 63 | 65 73 73 61 72 79 0a 66 |is unnec|essary.f|
|00003cc0| 6f 72 20 74 68 65 20 76 | 61 73 74 20 6d 61 6a 6f |or the v|ast majo|
|00003cd0| 72 69 74 79 20 6f 66 20 | 55 4e 49 58 20 76 61 72 |rity of |UNIX var|
|00003ce0| 69 61 6e 74 73 2e 29 0a | 0a 49 6e 73 74 61 6c 6c |iants.).|.Install|
|00003cf0| 61 74 69 6f 6e 20 69 6e | 73 74 72 75 63 74 69 6f |ation in|structio|
|00003d00| 6e 73 20 63 61 6e 20 62 | 65 20 66 6f 75 6e 64 20 |ns can b|e found |
|00003d10| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 6e 61 6d 65 |in the f|ile name|
|00003d20| 64 20 49 4e 53 54 41 4c | 4c 2e 0a 0a 54 68 69 73 |d INSTAL|L...This|
|00003d30| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 20 | impleme|ntation |
|00003d40| 69 73 20 70 72 6f 76 69 | 64 65 64 20 62 79 3a 0a |is provi|ded by:.|
|00003d50| 0a 09 44 6f 75 67 6c 61 | 73 20 41 2e 20 47 77 79 |..Dougla|s A. Gwy|
|00003d60| 6e 0a 09 55 2e 53 2e 20 | 41 72 6d 79 20 42 61 6c |n..U.S. |Army Bal|
|00003d70| 6c 69 73 74 69 63 20 52 | 65 73 65 61 72 63 68 20 |listic R|esearch |
|00003d80| 4c 61 62 6f 72 61 74 6f | 72 79 0a 09 53 4c 43 42 |Laborato|ry..SLCB|
|00003d90| 52 2d 56 4c 2d 56 0a 09 | 41 62 65 72 64 65 65 6e |R-VL-V..|Aberdeen|
|00003da0| 20 50 72 6f 76 69 6e 67 | 20 47 72 6f 75 6e 64 2c | Proving| Ground,|
|00003db0| 20 4d 44 20 32 31 30 30 | 35 2d 35 30 36 36 0a 0a | MD 2100|5-5066..|
|00003dc0| 09 28 33 30 31 29 32 37 | 38 2d 36 36 34 37 0a 0a |.(301)27|8-6647..|
|00003dd0| 09 47 77 79 6e 40 42 52 | 4c 2e 4d 49 4c 20 6f 72 |.Gwyn@BR|L.MIL or|
|00003de0| 20 73 65 69 73 6d 6f 21 | 62 72 6c 21 67 77 79 6e | seismo!|brl!gwyn|
|00003df0| 0a 0a 54 68 69 73 20 69 | 73 20 55 4e 53 55 50 50 |..This i|s UNSUPP|
|00003e00| 4f 52 54 45 44 2c 20 75 | 73 65 2d 61 74 2d 79 6f |ORTED, u|se-at-yo|
|00003e10| 75 72 2d 6f 77 6e 2d 72 | 69 73 6b 2c 20 66 72 65 |ur-own-r|isk, fre|
|00003e20| 65 20 73 6f 66 74 77 61 | 72 65 20 69 6e 20 74 68 |e softwa|re in th|
|00003e30| 65 20 70 75 62 6c 69 63 | 20 64 6f 6d 61 69 6e 2e |e public| domain.|
|00003e40| 0a 48 6f 77 65 76 65 72 | 2c 20 49 20 77 6f 75 6c |.However|, I woul|
|00003e50| 64 20 61 70 70 72 65 63 | 69 61 74 65 20 68 65 61 |d apprec|iate hea|
|00003e60| 72 69 6e 67 20 6f 66 20 | 61 6e 79 20 61 63 74 75 |ring of |any actu|
|00003e70| 61 6c 20 62 75 67 73 20 | 79 6f 75 20 66 69 6e 64 |al bugs |you find|
|00003e80| 20 69 6e 20 74 68 69 73 | 0a 69 6d 70 6c 65 6d 65 | in this|.impleme|
|00003e90| 6e 74 61 74 69 6f 6e 20 | 61 6e 64 2f 6f 72 20 61 |ntation |and/or a|
|00003ea0| 6e 79 20 69 6d 70 72 6f | 76 65 6d 65 6e 74 73 20 |ny impro|vements |
|00003eb0| 79 6f 75 20 63 6f 6d 65 | 20 75 70 20 77 69 74 68 |you come| up with|
|00003ec0| 2e 0a 20 74 68 65 20 76 | 61 73 74 20 6d 61 6a 6f |.. the v|ast majo|
|00003ed0| 72 69 74 79 20 6f 66 20 | 55 4e 49 58 20 76 61 72 |rity of |UNIX var|
|00003ee0| 69 61 6e 74 73 2e 29 0a | 0a 49 6e 73 74 61 6c 6c |iants.).|.Install|
|00003ef0| 61 74 69 6f 6e 20 69 6e | 73 74 72 75 63 74 69 6f |ation in|structio|
|00003f00| 6e 73 20 63 61 6e 20 62 | 65 20 66 6f 75 6e 64 20 |ns can b|e found |
|00003f10| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 6e 61 6d 65 |in the f|ile name|
|00003f20| 64 20 49 4e 53 54 41 4c | 4c 2e 0a 0a 54 68 69 73 |d INSTAL|L...This|
|00003f30| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 20 | impleme|ntation |
|00003f40| 69 73 20 70 72 6f 76 69 | 64 65 64 20 62 79 3a 0a |is provi|ded by:.|
|00003f50| 0a 09 44 6f 75 67 6c 61 | 73 20 41 2e 20 47 77 79 |..Dougla|s A. Gwy|
|00003f60| 6e 0a 09 55 2e 53 2e 20 | 41 72 6d 79 20 42 61 6c |n..U.S. |Army Bal|
|00003f70| 6c 69 73 74 69 63 20 52 | 65 73 65 61 72 63 68 20 |listic R|esearch |
|00003f80| 4c 61 62 6f 72 61 74 6f | 72 79 0a 09 53 4c 43 42 |Laborato|ry..SLCB|
|00003f90| 52 2d 56 4c 2d 56 0a 09 | 41 62 65 72 64 65 65 6e |R-VL-V..|Aberdeen|
|00003fa0| 20 50 72 6f 76 69 6e 67 | 20 47 72 6f 75 6e 64 2c | Proving| Ground,|
|00003fb0| 20 4d 44 20 32 31 30 30 | 35 2d 35 30 36 36 0a 0a | MD 2100|5-5066..|
|00003fc0| 09 28 33 30 31 29 32 37 | 38 2d 36 36 34 37 0a 0a |.(301)27|8-6647..|
|00003fd0| 09 47 77 79 6e 40 42 52 | 4c 2e 4d 49 4c 20 6f 72 |.Gwyn@BR|L.MIL or|
|00003fe0| 20 73 65 69 73 6d 6f 21 | 62 72 6c 21 67 77 79 6e | seismo!|brl!gwyn|
|00003ff0| 0a 0a 54 68 69 73 20 69 | 73 20 55 4e 53 55 50 50 |..This i|s UNSUPP|
|00004000| 53 79 6d 62 6f 6c 69 63 | 52 65 76 73 00 00 00 00 |Symbolic|Revs....|
|00004010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004060| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00004070| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00004080| 30 30 30 30 30 35 31 20 | 30 34 34 32 35 37 30 37 |0000051 |04425707|
|00004090| 34 31 35 20 30 30 37 31 | 35 37 00 20 20 00 00 00 |415 0071|57. ...|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 56 31 20 76 65 72 73 69 | 6f 6e 20 61 73 20 64 69 |V1 versi|on as di|
|00004210| 73 74 72 69 62 75 74 65 | 64 20 77 69 74 68 20 67 |stribute|d with g|
|00004220| 63 63 20 56 31 2e 33 35 | 0a 65 20 69 6e 20 74 68 |cc V1.35|.e in th|
|00004230| 65 20 70 75 62 6c 69 63 | 20 64 6f 6d 61 69 6e 2e |e public| domain.|
|00004240| 0a 48 6f 77 65 76 65 72 | 2c 20 49 20 77 6f 75 6c |.However|, I woul|
|00004250| 64 20 61 70 70 72 65 63 | 69 61 74 65 20 68 65 61 |d apprec|iate hea|
|00004260| 72 69 6e 67 20 6f 66 20 | 61 6e 79 20 61 63 74 75 |ring of |any actu|
|00004270| 61 6c 20 62 75 67 73 20 | 79 6f 75 20 66 69 6e 64 |al bugs |you find|
|00004280| 20 69 6e 20 74 68 69 73 | 0a 69 6d 70 6c 65 6d 65 | in this|.impleme|
|00004290| 6e 74 61 74 69 6f 6e 20 | 61 6e 64 2f 6f 72 20 61 |ntation |and/or a|
|000042a0| 6e 79 20 69 6d 70 72 6f | 76 65 6d 65 6e 74 73 20 |ny impro|vements |
|000042b0| 79 6f 75 20 63 6f 6d 65 | 20 75 70 20 77 69 74 68 |you come| up with|
|000042c0| 2e 0a 20 74 68 65 20 76 | 61 73 74 20 6d 61 6a 6f |.. the v|ast majo|
|000042d0| 72 69 74 79 20 6f 66 20 | 55 4e 49 58 20 76 61 72 |rity of |UNIX var|
|000042e0| 69 61 6e 74 73 2e 29 0a | 0a 49 6e 73 74 61 6c 6c |iants.).|.Install|
|000042f0| 61 74 69 6f 6e 20 69 6e | 73 74 72 75 63 74 69 6f |ation in|structio|
|00004300| 6e 73 20 63 61 6e 20 62 | 65 20 66 6f 75 6e 64 20 |ns can b|e found |
|00004310| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 6e 61 6d 65 |in the f|ile name|
|00004320| 64 20 49 4e 53 54 41 4c | 4c 2e 0a 0a 54 68 69 73 |d INSTAL|L...This|
|00004330| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 20 | impleme|ntation |
|00004340| 69 73 20 70 72 6f 76 69 | 64 65 64 20 62 79 3a 0a |is provi|ded by:.|
|00004350| 0a 09 44 6f 75 67 6c 61 | 73 20 41 2e 20 47 77 79 |..Dougla|s A. Gwy|
|00004360| 6e 0a 09 55 2e 53 2e 20 | 41 72 6d 79 20 42 61 6c |n..U.S. |Army Bal|
|00004370| 6c 69 73 74 69 63 20 52 | 65 73 65 61 72 63 68 20 |listic R|esearch |
|00004380| 4c 61 62 6f 72 61 74 6f | 72 79 0a 09 53 4c 43 42 |Laborato|ry..SLCB|
|00004390| 52 2d 56 4c 2d 56 0a 09 | 41 62 65 72 64 65 65 6e |R-VL-V..|Aberdeen|
|000043a0| 20 50 72 6f 76 69 6e 67 | 20 47 72 6f 75 6e 64 2c | Proving| Ground,|
|000043b0| 20 4d 44 20 32 31 30 30 | 35 2d 35 30 36 36 0a 0a | MD 2100|5-5066..|
|000043c0| 09 28 33 30 31 29 32 37 | 38 2d 36 36 34 37 0a 0a |.(301)27|8-6647..|
|000043d0| 09 47 77 79 6e 40 42 52 | 4c 2e 4d 49 4c 20 6f 72 |.Gwyn@BR|L.MIL or|
|000043e0| 20 73 65 69 73 6d 6f 21 | 62 72 6c 21 67 77 79 6e | seismo!|brl!gwyn|
|000043f0| 0a 0a 54 68 69 73 20 69 | 73 20 55 4e 53 55 50 50 |..This i|s UNSUPP|
|00004400| 58 6d 61 6b 65 66 69 6c | 65 2e 31 36 00 00 00 00 |Xmakefil|e.16....|
|00004410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00004470| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00004480| 30 30 30 31 31 30 31 20 | 30 34 34 32 35 37 30 37 |0001101 |04425707|
|00004490| 34 31 35 20 30 30 36 36 | 36 35 00 20 20 00 00 00 |415 0066|65. ...|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004600| 23 0a 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.# Make|file for|
|00004610| 20 4d 69 6e 69 78 20 53 | 54 20 75 73 69 6e 67 20 | Minix S|T using |
|00004620| 47 6e 75 20 67 63 63 20 | 69 6e 20 31 36 20 62 69 |Gnu gcc |in 16 bi|
|00004630| 74 20 69 6e 74 65 67 65 | 72 20 6d 6f 64 65 0a 23 |t intege|r mode.#|
|00004640| 0a 43 52 4f 53 53 44 49 | 52 20 3d 20 2f 64 73 72 |.CROSSDI|R = /dsr|
|00004650| 67 2f 62 61 6d 6d 69 2f | 63 72 6f 73 73 2d 6d 69 |g/bammi/|cross-mi|
|00004660| 6e 69 78 0a 43 52 4f 53 | 53 4c 49 42 20 3d 20 24 |nix.CROS|SLIB = $|
|00004670| 28 43 52 4f 53 53 44 49 | 52 29 2f 6c 69 62 73 0a |(CROSSDI|R)/libs.|
|00004680| 43 52 4f 53 53 42 49 4e | 20 3d 20 24 28 43 52 4f |CROSSBIN| = $(CRO|
|00004690| 53 53 44 49 52 29 2f 62 | 69 6e 0a 0a 43 43 20 3d |SSDIR)/b|in..CC =|
|000046a0| 20 24 28 43 52 4f 53 53 | 42 49 4e 29 2f 6d 67 63 | $(CROSS|BIN)/mgc|
|000046b0| 63 20 2d 42 24 28 43 52 | 4f 53 53 4c 49 42 29 2f |c -B$(CR|OSSLIB)/|
|000046c0| 0a 43 46 4c 41 47 53 20 | 3d 20 2d 6d 73 68 6f 72 |.CFLAGS |= -mshor|
|000046d0| 74 20 2d 4f 20 2d 44 55 | 46 53 20 2d 44 41 54 41 |t -O -DU|FS -DATA|
|000046e0| 52 49 5f 53 54 20 2d 76 | 0a 41 52 20 3d 20 2f 64 |RI_ST -v|.AR = /d|
|000046f0| 73 72 67 2f 62 61 6d 6d | 69 2f 63 72 6f 73 73 2d |srg/bamm|i/cross-|
|00004700| 67 63 63 2f 62 69 6e 2f | 63 61 72 0a 41 52 46 4c |gcc/bin/|car.ARFL|
|00004710| 41 47 53 20 3d 20 73 72 | 76 0a 0a 4f 42 4a 20 3d |AGS = sr|v..OBJ =|
|00004720| 20 63 6c 6f 73 65 64 69 | 72 2e 6f 20 6f 70 65 6e | closedi|r.o open|
|00004730| 64 69 72 2e 6f 20 73 65 | 65 6b 64 69 72 2e 6f 20 |dir.o se|ekdir.o |
|00004740| 72 65 61 64 64 69 72 2e | 6f 20 67 65 74 64 65 6e |readdir.|o getden|
|00004750| 74 73 2e 6f 20 72 65 77 | 69 6e 64 64 69 72 2e 6f |ts.o rew|inddir.o|
|00004760| 20 5c 0a 74 65 6c 6c 64 | 69 72 2e 6f 0a 0a 41 4c | \.telld|ir.o..AL|
|00004770| 4c 20 3d 20 6c 69 62 64 | 69 72 2e 61 0a 0a 61 6c |L = libd|ir.a..al|
|00004780| 6c 3a 20 24 28 41 4c 4c | 29 0a 0a 24 28 41 4c 4c |l: $(ALL|)..$(ALL|
|00004790| 29 20 3a 20 24 28 4f 42 | 4a 29 0a 09 24 28 41 52 |) : $(OB|J)..$(AR|
|000047a0| 29 20 24 28 41 52 46 4c | 41 47 53 29 20 24 28 41 |) $(ARFL|AGS) $(A|
|000047b0| 4c 4c 29 20 24 28 4f 42 | 4a 29 0a 0a 69 6e 73 74 |LL) $(OB|J)..inst|
|000047c0| 61 6c 6c 3a 20 24 28 41 | 4c 4c 29 0a 09 63 70 20 |all: $(A|LL)..cp |
|000047d0| 24 28 41 4c 4c 29 20 24 | 28 43 52 4f 53 53 4c 49 |$(ALL) $|(CROSSLI|
|000047e0| 42 29 0a 0a 63 6c 65 61 | 6e 3a 0a 09 72 6d 20 2d |B)..clea|n:..rm -|
|000047f0| 66 20 2a 2e 6f 20 24 28 | 41 4c 4c 29 0a 0a 74 65 |f *.o $(|ALL)..te|
|00004800| 73 74 64 69 72 3a 20 74 | 65 73 74 64 69 72 2e 6f |stdir: t|estdir.o|
|00004810| 0a 09 24 28 43 43 29 20 | 2d 6d 73 68 6f 72 74 20 |..$(CC) |-mshort |
|00004820| 2d 6f 20 74 65 73 74 64 | 69 72 20 74 65 73 74 64 |-o testd|ir testd|
|00004830| 69 72 2e 6f 20 6c 69 62 | 64 69 72 2e 61 20 2d 76 |ir.o lib|dir.a -v|
|00004840| 0a 43 52 4f 53 53 44 49 | 52 20 3d 20 2f 64 73 72 |.CROSSDI|R = /dsr|
|00004850| 67 2f 62 61 6d 6d 69 2f | 63 72 6f 73 73 2d 6d 69 |g/bammi/|cross-mi|
|00004860| 6e 69 78 0a 43 52 4f 53 | 53 4c 49 42 20 3d 20 24 |nix.CROS|SLIB = $|
|00004870| 28 43 52 4f 53 53 44 49 | 52 29 2f 6c 69 62 73 0a |(CROSSDI|R)/libs.|
|00004880| 43 52 4f 53 53 42 49 4e | 20 3d 20 24 28 43 52 4f |CROSSBIN| = $(CRO|
|00004890| 53 53 44 49 52 29 2f 62 | 69 6e 0a 0a 43 43 20 3d |SSDIR)/b|in..CC =|
|000048a0| 20 24 28 43 52 4f 53 53 | 42 49 4e 29 2f 6d 67 63 | $(CROSS|BIN)/mgc|
|000048b0| 63 20 2d 42 24 28 43 52 | 4f 53 53 4c 49 42 29 2f |c -B$(CR|OSSLIB)/|
|000048c0| 0a 43 46 4c 41 47 53 20 | 3d 20 2d 6d 73 68 6f 72 |.CFLAGS |= -mshor|
|000048d0| 74 20 2d 4f 20 2d 44 55 | 46 53 20 2d 44 41 54 41 |t -O -DU|FS -DATA|
|000048e0| 52 49 5f 53 54 20 2d 76 | 0a 41 52 20 3d 20 2f 64 |RI_ST -v|.AR = /d|
|000048f0| 73 72 67 2f 62 61 6d 6d | 69 2f 63 72 6f 73 73 2d |srg/bamm|i/cross-|
|00004900| 67 63 63 2f 62 69 6e 2f | 63 61 72 0a 41 52 46 4c |gcc/bin/|car.ARFL|
|00004910| 41 47 53 20 3d 20 73 72 | 76 0a 0a 4f 42 4a 20 3d |AGS = sr|v..OBJ =|
|00004920| 20 63 6c 6f 73 65 64 69 | 72 2e 6f 20 6f 70 65 6e | closedi|r.o open|
|00004930| 64 69 72 2e 6f 20 73 65 | 65 6b 64 69 72 2e 6f 20 |dir.o se|ekdir.o |
|00004940| 72 65 61 64 64 69 72 2e | 6f 20 67 65 74 64 65 6e |readdir.|o getden|
|00004950| 74 73 2e 6f 20 72 65 77 | 69 6e 64 64 69 72 2e 6f |ts.o rew|inddir.o|
|00004960| 20 5c 0a 74 65 6c 6c 64 | 69 72 2e 6f 0a 0a 41 4c | \.telld|ir.o..AL|
|00004970| 4c 20 3d 20 6c 69 62 64 | 69 72 2e 61 0a 0a 61 6c |L = libd|ir.a..al|
|00004980| 6c 3a 20 24 28 41 4c 4c | 29 0a 0a 24 28 41 4c 4c |l: $(ALL|)..$(ALL|
|00004990| 29 20 3a 20 24 28 4f 42 | 4a 29 0a 09 24 28 41 52 |) : $(OB|J)..$(AR|
|000049a0| 29 20 24 28 41 52 46 4c | 41 47 53 29 20 24 28 41 |) $(ARFL|AGS) $(A|
|000049b0| 4c 4c 29 20 24 28 4f 42 | 4a 29 0a 0a 69 6e 73 74 |LL) $(OB|J)..inst|
|000049c0| 61 6c 6c 3a 20 24 28 41 | 4c 4c 29 0a 09 63 70 20 |all: $(A|LL)..cp |
|000049d0| 24 28 41 4c 4c 29 20 24 | 28 43 52 4f 53 53 4c 49 |$(ALL) $|(CROSSLI|
|000049e0| 42 29 0a 0a 63 6c 65 61 | 6e 3a 0a 09 72 6d 20 2d |B)..clea|n:..rm -|
|000049f0| 66 20 2a 2e 6f 20 24 28 | 41 4c 4c 29 0a 0a 74 65 |f *.o $(|ALL)..te|
|00004a00| 63 6c 6f 73 65 64 69 72 | 2e 63 00 00 00 00 00 00 |closedir|.c......|
|00004a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a60| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00004a70| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00004a80| 30 30 30 31 32 36 36 20 | 30 34 34 32 35 37 30 37 |0001266 |04425707|
|00004a90| 34 31 35 20 30 30 36 35 | 37 34 00 20 20 00 00 00 |415 0065|74. ...|
|00004aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004c00| 2f 2a 0a 09 63 6c 6f 73 | 65 64 69 72 20 2d 2d 20 |/*..clos|edir -- |
|00004c10| 63 6c 6f 73 65 20 61 20 | 64 69 72 65 63 74 6f 72 |close a |director|
|00004c20| 79 20 73 74 72 65 61 6d | 0a 0a 09 6c 61 73 74 20 |y stream|...last |
|00004c30| 65 64 69 74 3a 09 32 35 | 2d 41 70 72 2d 31 39 38 |edit:.25|-Apr-198|
|00004c40| 37 09 44 20 41 20 47 77 | 79 6e 0a 2a 2f 0a 0a 23 |7.D A Gw|yn.*/..#|
|00004c50| 69 6e 63 6c 75 64 65 09 | 3c 73 79 73 2f 65 72 72 |include.|<sys/err|
|00004c60| 6e 6f 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 09 3c |no.h>.#i|nclude.<|
|00004c70| 73 79 73 2f 74 79 70 65 | 73 2e 68 3e 0a 23 69 6e |sys/type|s.h>.#in|
|00004c80| 63 6c 75 64 65 09 3c 64 | 69 72 65 6e 74 2e 68 3e |clude.<d|irent.h>|
|00004c90| 0a 0a 74 79 70 65 64 65 | 66 20 63 68 61 72 09 2a |..typede|f char.*|
|00004ca0| 70 6f 69 6e 74 65 72 3b | 09 09 2f 2a 20 28 76 6f |pointer;|../* (vo|
|00004cb0| 69 64 20 2a 29 20 69 66 | 20 79 6f 75 20 68 61 76 |id *) if| you hav|
|00004cc0| 65 20 69 74 20 2a 2f 0a | 0a 23 69 66 64 65 66 20 |e it */.|.#ifdef |
|00004cd0| 5f 5f 53 54 44 43 5f 5f | 0a 76 6f 69 64 09 66 72 |__STDC__|.void.fr|
|00004ce0| 65 65 28 76 6f 69 64 20 | 2a 29 3b 0a 69 6e 74 09 |ee(void |*);.int.|
|00004cf0| 63 6c 6f 73 65 28 69 6e | 74 29 3b 0a 23 65 6c 73 |close(in|t);.#els|
|00004d00| 65 0a 65 78 74 65 72 6e | 20 76 6f 69 64 09 66 72 |e.extern| void.fr|
|00004d10| 65 65 28 29 3b 0a 65 78 | 74 65 72 6e 20 69 6e 74 |ee();.ex|tern int|
|00004d20| 09 63 6c 6f 73 65 28 29 | 3b 0a 23 65 6e 64 69 66 |.close()|;.#endif|
|00004d30| 0a 0a 65 78 74 65 72 6e | 20 69 6e 74 09 65 72 72 |..extern| int.err|
|00004d40| 6e 6f 3b 0a 0a 23 69 66 | 6e 64 65 66 20 4e 55 4c |no;..#if|ndef NUL|
|00004d50| 4c 0a 23 64 65 66 69 6e | 65 09 4e 55 4c 4c 09 30 |L.#defin|e.NULL.0|
|00004d60| 0a 23 65 6e 64 69 66 0a | 0a 69 6e 74 0a 63 6c 6f |.#endif.|.int.clo|
|00004d70| 73 65 64 69 72 28 20 64 | 69 72 70 20 29 0a 09 72 |sedir( d|irp )..r|
|00004d80| 65 67 69 73 74 65 72 20 | 44 49 52 09 2a 64 69 72 |egister |DIR.*dir|
|00004d90| 70 3b 09 09 2f 2a 20 73 | 74 72 65 61 6d 20 66 72 |p;../* s|tream fr|
|00004da0| 6f 6d 20 6f 70 65 6e 64 | 69 72 28 29 20 2a 2f 0a |om opend|ir() */.|
|00004db0| 09 7b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |.{..regi|ster int|
|00004dc0| 09 66 64 3b 0a 0a 09 69 | 66 20 28 20 64 69 72 70 |.fd;...i|f ( dirp|
|00004dd0| 20 3d 3d 20 4e 55 4c 4c | 20 7c 7c 20 64 69 72 70 | == NULL| || dirp|
|00004de0| 2d 3e 64 64 5f 62 75 66 | 20 3d 3d 20 4e 55 4c 4c |->dd_buf| == NULL|
|00004df0| 20 29 0a 09 09 7b 0a 09 | 09 65 72 72 6e 6f 20 3d | )...{..|.errno =|
|00004e00| 20 45 46 41 55 4c 54 3b | 0a 09 09 72 65 74 75 72 | EFAULT;|...retur|
|00004e10| 6e 20 2d 31 3b 09 09 2f | 2a 20 69 6e 76 61 6c 69 |n -1;../|* invali|
|00004e20| 64 20 70 6f 69 6e 74 65 | 72 20 2a 2f 0a 09 09 7d |d pointe|r */...}|
|00004e30| 0a 0a 09 66 64 20 3d 20 | 64 69 72 70 2d 3e 64 64 |...fd = |dirp->dd|
|00004e40| 5f 66 64 3b 09 09 2f 2a | 20 62 75 67 20 66 69 78 |_fd;../*| bug fix|
|00004e50| 20 74 68 61 6e 6b 73 20 | 74 6f 20 52 2e 20 53 61 | thanks |to R. Sa|
|00004e60| 6c 7a 20 2a 2f 0a 09 66 | 72 65 65 28 20 28 70 6f |lz */..f|ree( (po|
|00004e70| 69 6e 74 65 72 29 64 69 | 72 70 2d 3e 64 64 5f 62 |inter)di|rp->dd_b|
|00004e80| 75 66 20 29 3b 0a 09 66 | 72 65 65 28 20 28 70 6f |uf );..f|ree( (po|
|00004e90| 69 6e 74 65 72 29 64 69 | 72 70 20 29 3b 0a 09 72 |inter)di|rp );..r|
|00004ea0| 65 74 75 72 6e 20 63 6c | 6f 73 65 28 20 66 64 20 |eturn cl|ose( fd |
|00004eb0| 29 3b 0a 09 7d 0a 69 66 | 20 79 6f 75 20 68 61 76 |);..}.if| you hav|
|00004ec0| 65 20 69 74 20 2a 2f 0a | 0a 23 69 66 64 65 66 20 |e it */.|.#ifdef |
|00004ed0| 5f 5f 53 54 44 43 5f 5f | 0a 76 6f 69 64 09 66 72 |__STDC__|.void.fr|
|00004ee0| 65 65 28 76 6f 69 64 20 | 2a 29 3b 0a 69 6e 74 09 |ee(void |*);.int.|
|00004ef0| 63 6c 6f 73 65 28 69 6e | 74 29 3b 0a 23 65 6c 73 |close(in|t);.#els|
|00004f00| 65 0a 65 78 74 65 72 6e | 20 76 6f 69 64 09 66 72 |e.extern| void.fr|
|00004f10| 65 65 28 29 3b 0a 65 78 | 74 65 72 6e 20 69 6e 74 |ee();.ex|tern int|
|00004f20| 09 63 6c 6f 73 65 28 29 | 3b 0a 23 65 6e 64 69 66 |.close()|;.#endif|
|00004f30| 0a 0a 65 78 74 65 72 6e | 20 69 6e 74 09 65 72 72 |..extern| int.err|
|00004f40| 6e 6f 3b 0a 0a 23 69 66 | 6e 64 65 66 20 4e 55 4c |no;..#if|ndef NUL|
|00004f50| 4c 0a 23 64 65 66 69 6e | 65 09 4e 55 4c 4c 09 30 |L.#defin|e.NULL.0|
|00004f60| 0a 23 65 6e 64 69 66 0a | 0a 69 6e 74 0a 63 6c 6f |.#endif.|.int.clo|
|00004f70| 73 65 64 69 72 28 20 64 | 69 72 70 20 29 0a 09 72 |sedir( d|irp )..r|
|00004f80| 65 67 69 73 74 65 72 20 | 44 49 52 09 2a 64 69 72 |egister |DIR.*dir|
|00004f90| 70 3b 09 09 2f 2a 20 73 | 74 72 65 61 6d 20 66 72 |p;../* s|tream fr|
|00004fa0| 6f 6d 20 6f 70 65 6e 64 | 69 72 28 29 20 2a 2f 0a |om opend|ir() */.|
|00004fb0| 09 7b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |.{..regi|ster int|
|00004fc0| 09 66 64 3b 0a 0a 09 69 | 66 20 28 20 64 69 72 70 |.fd;...i|f ( dirp|
|00004fd0| 20 3d 3d 20 4e 55 4c 4c | 20 7c 7c 20 64 69 72 70 | == NULL| || dirp|
|00004fe0| 2d 3e 64 64 5f 62 75 66 | 20 3d 3d 20 4e 55 4c 4c |->dd_buf| == NULL|
|00004ff0| 20 29 0a 09 09 7b 0a 09 | 09 65 72 72 6e 6f 20 3d | )...{..|.errno =|
|00005000| 64 69 72 65 63 74 6f 72 | 79 2e 33 63 00 00 00 00 |director|y.3c....|
|00005010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005060| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 30 31 |....0006|44 .0001|
|00005070| 34 37 20 00 30 30 30 33 | 30 33 20 00 30 30 30 30 |47 .0003|03 .0000|
|00005080| 30 30 31 30 30 35 30 20 | 30 34 34 32 35 37 30 37 |0010050 |04425707|
|00005090| 34 31 36 20 30 30 37 30 | 34 37 00 20 20 00 00 00 |416 0070|47. ...|
|000050a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 2e 54 48 20 44 49 52 45 | 43 54 4f 52 59 20 33 43 |.TH DIRE|CTORY 3C|
|00005210| 20 22 53 74 61 6e 64 61 | 72 64 20 45 78 74 65 6e | "Standa|rd Exten|
|00005220| 73 69 6f 6e 22 0a 2e 53 | 48 20 4e 41 4d 45 0a 6f |sion"..S|H NAME.o|
|00005230| 70 65 6e 64 69 72 2c 20 | 72 65 61 64 64 69 72 2c |pendir, |readdir,|
|00005240| 20 74 65 6c 6c 64 69 72 | 2c 20 73 65 65 6b 64 69 | telldir|, seekdi|
|00005250| 72 2c 20 72 65 77 69 6e | 64 64 69 72 2c 20 63 6c |r, rewin|ddir, cl|
|00005260| 6f 73 65 64 69 72 20 5c | 2d 20 64 69 72 65 63 74 |osedir \|- direct|
|00005270| 6f 72 79 20 6f 70 65 72 | 61 74 69 6f 6e 73 0a 2e |ory oper|ations..|
|00005280| 53 48 20 53 59 4e 4f 50 | 53 49 53 0a 2e 42 20 22 |SH SYNOP|SIS..B "|
|00005290| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 74 79 |#include| <sys/ty|
|000052a0| 70 65 73 2e 68 3e 22 0a | 2e 62 72 0a 2e 42 20 22 |pes.h>".|.br..B "|
|000052b0| 23 69 6e 63 6c 75 64 65 | 20 3c 64 69 72 65 6e 74 |#include| <dirent|
|000052c0| 2e 68 3e 22 0a 2e 50 0a | 2e 42 20 22 44 49 52 20 |.h>"..P.|.B "DIR |
|000052d0| 5c 28 2a 2a 6f 70 65 6e | 64 69 72 20 28 64 69 72 |\(**open|dir (dir|
|000052e0| 6e 61 6d 65 29 22 0a 2e | 62 72 0a 2e 42 20 22 63 |name)"..|br..B "c|
|000052f0| 68 61 72 20 5c 28 2a 2a | 64 69 72 6e 61 6d 65 3b |har \(**|dirname;|
|00005300| 22 0a 2e 50 0a 2e 42 20 | 22 73 74 72 75 63 74 20 |"..P..B |"struct |
|00005310| 64 69 72 65 6e 74 20 5c | 28 2a 2a 72 65 61 64 64 |dirent \|(**readd|
|00005320| 69 72 20 28 64 69 72 70 | 29 22 0a 2e 62 72 0a 2e |ir (dirp|)"..br..|
|00005330| 42 20 22 44 49 52 20 5c | 28 2a 2a 64 69 72 70 3b |B "DIR \|(**dirp;|
|00005340| 22 0a 2e 50 0a 2e 42 20 | 22 6f 66 66 5f 74 20 74 |"..P..B |"off_t t|
|00005350| 65 6c 6c 64 69 72 20 28 | 64 69 72 70 29 22 0a 2e |elldir (|dirp)"..|
|00005360| 62 72 0a 2e 42 20 22 44 | 49 52 20 5c 28 2a 2a 64 |br..B "D|IR \(**d|
|00005370| 69 72 70 3b 22 0a 2e 50 | 0a 2e 42 20 22 76 6f 69 |irp;"..P|..B "voi|
|00005380| 64 20 73 65 65 6b 64 69 | 72 20 28 64 69 72 70 2c |d seekdi|r (dirp,|
|00005390| 20 6c 6f 63 29 22 0a 2e | 62 72 0a 2e 42 20 22 44 | loc)"..|br..B "D|
|000053a0| 49 52 20 5c 28 2a 2a 64 | 69 72 70 3b 22 0a 2e 62 |IR \(**d|irp;"..b|
|000053b0| 72 0a 2e 42 20 22 6f 66 | 66 5f 74 20 6c 6f 63 3b |r..B "of|f_t loc;|
|000053c0| 22 0a 2e 50 0a 2e 42 20 | 22 76 6f 69 64 20 72 65 |"..P..B |"void re|
|000053d0| 77 69 6e 64 64 69 72 20 | 28 64 69 72 70 29 22 0a |winddir |(dirp)".|
|000053e0| 2e 62 72 0a 2e 42 20 22 | 44 49 52 20 5c 28 2a 2a |.br..B "|DIR \(**|
|000053f0| 64 69 72 70 3b 22 0a 2e | 50 0a 2e 42 20 22 69 6e |dirp;"..|P..B "in|
|00005400| 74 20 63 6c 6f 73 65 64 | 69 72 20 28 64 69 72 70 |t closed|ir (dirp|
|00005410| 29 22 0a 2e 62 72 0a 2e | 42 20 22 44 49 52 20 5c |)"..br..|B "DIR \|
|00005420| 28 2a 2a 64 69 72 70 3b | 22 0a 2e 53 48 20 44 45 |(**dirp;|"..SH DE|
|00005430| 53 43 52 49 50 54 49 4f | 4e 0a 2e 49 20 4f 70 65 |SCRIPTIO|N..I Ope|
|00005440| 6e 64 69 72 0a 65 73 74 | 61 62 6c 69 73 68 65 73 |ndir.est|ablishes|
|00005450| 20 61 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 62 65 | a conne|ction be|
|00005460| 74 77 65 65 6e 0a 74 68 | 65 20 64 69 72 65 63 74 |tween.th|e direct|
|00005470| 6f 72 79 20 6e 61 6d 65 | 64 20 62 79 0a 2e 49 20 |ory name|d by..I |
|00005480| 64 69 72 6e 61 6d 65 0a | 61 6e 64 20 61 20 75 6e |dirname.|and a un|
|00005490| 69 71 75 65 20 6f 62 6a | 65 63 74 20 6f 66 20 74 |ique obj|ect of t|
|000054a0| 79 70 65 0a 2e 53 4d 20 | 44 49 52 0a 6b 6e 6f 77 |ype..SM |DIR.know|
|000054b0| 6e 20 61 73 20 61 0a 2e | 49 20 22 64 69 72 65 63 |n as a..|I "direc|
|000054c0| 74 6f 72 79 20 73 74 72 | 65 61 6d 22 0a 74 68 61 |tory str|eam".tha|
|000054d0| 74 20 69 74 20 63 72 65 | 61 74 65 73 2e 0a 2e 49 |t it cre|ates...I|
|000054e0| 20 4f 70 65 6e 64 69 72 | 0a 72 65 74 75 72 6e 73 | Opendir|.returns|
|000054f0| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 62 65 | a point|er to be|
|00005500| 20 75 73 65 64 20 74 6f | 20 69 64 65 6e 74 69 66 | used to| identif|
|00005510| 79 20 74 68 65 0a 64 69 | 72 65 63 74 6f 72 79 20 |y the.di|rectory |
|00005520| 73 74 72 65 61 6d 0a 69 | 6e 20 73 75 62 73 65 71 |stream.i|n subseq|
|00005530| 75 65 6e 74 20 6f 70 65 | 72 61 74 69 6f 6e 73 2e |uent ope|rations.|
|00005540| 0a 41 0a 2e 53 4d 20 4e | 55 4c 4c 0a 70 6f 69 6e |.A..SM N|ULL.poin|
|00005550| 74 65 72 20 69 73 20 72 | 65 74 75 72 6e 65 64 20 |ter is r|eturned |
|00005560| 69 66 0a 2e 49 20 64 69 | 72 6e 61 6d 65 0a 63 61 |if..I di|rname.ca|
|00005570| 6e 6e 6f 74 20 62 65 20 | 61 63 63 65 73 73 65 64 |nnot be |accessed|
|00005580| 20 6f 72 20 69 73 20 6e | 6f 74 20 61 20 64 69 72 | or is n|ot a dir|
|00005590| 65 63 74 6f 72 79 2c 0a | 6f 72 20 69 66 0a 2e 49 |ectory,.|or if..I|
|000055a0| 20 6f 70 65 6e 64 69 72 | 0a 69 73 20 75 6e 61 62 | opendir|.is unab|
|000055b0| 6c 65 20 74 6f 20 63 72 | 65 61 74 65 20 74 68 65 |le to cr|eate the|
|000055c0| 0a 2e 53 4d 20 44 49 52 | 0a 6f 62 6a 65 63 74 0a |..SM DIR|.object.|
|000055d0| 28 70 65 72 68 61 70 73 | 20 64 75 65 20 74 6f 20 |(perhaps| due to |
|000055e0| 69 6e 73 75 66 66 69 63 | 69 65 6e 74 20 6d 65 6d |insuffic|ient mem|
|000055f0| 6f 72 79 29 2e 0a 2e 50 | 0a 2e 49 20 52 65 61 64 |ory)...P|..I Read|
|00005600| 64 69 72 0a 72 65 74 75 | 72 6e 73 20 61 20 70 6f |dir.retu|rns a po|
|00005610| 69 6e 74 65 72 20 74 6f | 20 61 6e 20 69 6e 74 65 |inter to| an inte|
|00005620| 72 6e 61 6c 20 73 74 72 | 75 63 74 75 72 65 0a 63 |rnal str|ucture.c|
|00005630| 6f 6e 74 61 69 6e 69 6e | 67 20 69 6e 66 6f 72 6d |ontainin|g inform|
|00005640| 61 74 69 6f 6e 20 61 62 | 6f 75 74 20 74 68 65 20 |ation ab|out the |
|00005650| 6e 65 78 74 20 61 63 74 | 69 76 65 20 64 69 72 65 |next act|ive dire|
|00005660| 63 74 6f 72 79 20 65 6e | 74 72 79 2e 0a 4e 6f 20 |ctory en|try..No |
|00005670| 69 6e 61 63 74 69 76 65 | 20 65 6e 74 72 69 65 73 |inactive| entries|
|00005680| 20 61 72 65 20 72 65 70 | 6f 72 74 65 64 2e 0a 54 | are rep|orted..T|
|00005690| 68 65 20 69 6e 74 65 72 | 6e 61 6c 20 73 74 72 75 |he inter|nal stru|
|000056a0| 63 74 75 72 65 20 6d 61 | 79 20 62 65 20 6f 76 65 |cture ma|y be ove|
|000056b0| 72 77 72 69 74 74 65 6e | 20 62 79 0a 61 6e 6f 74 |rwritten| by.anot|
|000056c0| 68 65 72 20 6f 70 65 72 | 61 74 69 6f 6e 20 6f 6e |her oper|ation on|
|000056d0| 20 74 68 65 20 73 61 6d | 65 0a 64 69 72 65 63 74 | the sam|e.direct|
|000056e0| 6f 72 79 20 73 74 72 65 | 61 6d 3b 0a 74 68 65 20 |ory stre|am;.the |
|000056f0| 61 6d 6f 75 6e 74 20 6f | 66 20 73 74 6f 72 61 67 |amount o|f storag|
|00005700| 65 20 6e 65 65 64 65 64 | 20 74 6f 20 68 6f 6c 64 |e needed| to hold|
|00005710| 20 61 20 63 6f 70 79 0a | 6f 66 20 74 68 65 20 69 | a copy.|of the i|
|00005720| 6e 74 65 72 6e 61 6c 20 | 73 74 72 75 63 74 75 72 |nternal |structur|
|00005730| 65 20 69 73 20 67 69 76 | 65 6e 20 62 79 20 74 68 |e is giv|en by th|
|00005740| 65 20 76 61 6c 75 65 20 | 6f 66 20 61 20 6d 61 63 |e value |of a mac|
|00005750| 72 6f 2c 0a 2e 49 52 20 | 44 49 52 45 4e 54 53 49 |ro,..IR |DIRENTSI|
|00005760| 5a 28 73 74 72 6c 65 6e | 28 64 69 72 65 6e 74 70 |Z(strlen|(direntp|
|00005770| 5c 2d 3e 64 5f 6e 61 6d | 65 29 29 20 2c 0a 6e 6f |\->d_nam|e)) ,.no|
|00005780| 74 20 62 79 0a 2e 49 20 | 22 73 69 7a 65 6f 66 28 |t by..I |"sizeof(|
|00005790| 73 74 72 75 63 74 5c 20 | 64 69 72 65 6e 74 29 22 |struct\ |dirent)"|
|000057a0| 0a 61 73 20 6f 6e 65 20 | 6d 69 67 68 74 20 65 78 |.as one |might ex|
|000057b0| 70 65 63 74 2e 0a 41 0a | 2e 53 4d 20 4e 55 4c 4c |pect..A.|.SM NULL|
|000057c0| 0a 70 6f 69 6e 74 65 72 | 20 69 73 20 72 65 74 75 |.pointer| is retu|
|000057d0| 72 6e 65 64 0a 75 70 6f | 6e 20 72 65 61 63 68 69 |rned.upo|n reachi|
|000057e0| 6e 67 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |ng the e|nd of th|
|000057f0| 65 20 64 69 72 65 63 74 | 6f 72 79 2c 0a 75 70 6f |e direct|ory,.upo|
|00005800| 6e 20 64 65 74 65 63 74 | 69 6e 67 20 61 6e 20 69 |n detect|ing an i|
|00005810| 6e 76 61 6c 69 64 20 6c | 6f 63 61 74 69 6f 6e 20 |nvalid l|ocation |
|00005820| 69 6e 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 79 |in the d|irectory|
|00005830| 2c 0a 6f 72 20 75 70 6f | 6e 20 6f 63 63 75 72 72 |,.or upo|n occurr|
|00005840| 65 6e 63 65 20 6f 66 20 | 61 6e 20 65 72 72 6f 72 |ence of |an error|
|00005850| 20 77 68 69 6c 65 20 72 | 65 61 64 69 6e 67 20 74 | while r|eading t|
|00005860| 68 65 20 64 69 72 65 63 | 74 6f 72 79 2e 0a 2e 50 |he direc|tory...P|
|00005870| 0a 2e 49 20 54 65 6c 6c | 64 69 72 0a 72 65 74 75 |..I Tell|dir.retu|
|00005880| 72 6e 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |rns the |current |
|00005890| 70 6f 73 69 74 69 6f 6e | 20 61 73 73 6f 63 69 61 |position| associa|
|000058a0| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 6e 61 6d |ted with| the nam|
|000058b0| 65 64 0a 64 69 72 65 63 | 74 6f 72 79 20 73 74 72 |ed.direc|tory str|
|000058c0| 65 61 6d 0a 66 6f 72 20 | 6c 61 74 65 72 20 75 73 |eam.for |later us|
|000058d0| 65 20 61 73 20 61 6e 20 | 61 72 67 75 6d 65 6e 74 |e as an |argument|
|000058e0| 20 74 6f 0a 2e 49 52 20 | 73 65 65 6b 64 69 72 20 | to..IR |seekdir |
|000058f0| 2e 0a 2e 50 0a 2e 49 20 | 53 65 65 6b 64 69 72 0a |...P..I |Seekdir.|
|00005900| 73 65 74 73 20 74 68 65 | 20 70 6f 73 69 74 69 6f |sets the| positio|
|00005910| 6e 20 6f 66 20 74 68 65 | 20 6e 65 78 74 0a 2e 49 |n of the| next..I|
|00005920| 20 72 65 61 64 64 69 72 | 0a 6f 70 65 72 61 74 69 | readdir|.operati|
|00005930| 6f 6e 20 6f 6e 20 74 68 | 65 20 6e 61 6d 65 64 0a |on on th|e named.|
|00005940| 64 69 72 65 63 74 6f 72 | 79 20 73 74 72 65 61 6d |director|y stream|
|00005950| 2e 0a 54 68 65 20 6e 65 | 77 20 70 6f 73 69 74 69 |..The ne|w positi|
|00005960| 6f 6e 20 72 65 76 65 72 | 74 73 20 74 6f 20 74 68 |on rever|ts to th|
|00005970| 65 20 6f 6e 65 20 61 73 | 73 6f 63 69 61 74 65 64 |e one as|sociated|
|00005980| 20 77 69 74 68 20 74 68 | 65 0a 64 69 72 65 63 74 | with th|e.direct|
|00005990| 6f 72 79 20 73 74 72 65 | 61 6d 0a 77 68 65 6e 20 |ory stre|am.when |
|000059a0| 74 68 65 0a 2e 49 20 74 | 65 6c 6c 64 69 72 0a 6f |the..I t|elldir.o|
|000059b0| 70 65 72 61 74 69 6f 6e | 20 66 72 6f 6d 20 77 68 |peration| from wh|
|000059c0| 69 63 68 0a 2e 49 20 6c | 6f 63 0a 77 61 73 20 6f |ich..I l|oc.was o|
|000059d0| 62 74 61 69 6e 65 64 20 | 77 61 73 20 70 65 72 66 |btained |was perf|
|000059e0| 6f 72 6d 65 64 2e 0a 2e | 50 0a 2e 49 20 52 65 77 |ormed...|P..I Rew|
|000059f0| 69 6e 64 64 69 72 0a 72 | 65 73 65 74 73 20 74 68 |inddir.r|esets th|
|00005a00| 65 20 70 6f 73 69 74 69 | 6f 6e 20 6f 66 20 74 68 |e positi|on of th|
|00005a10| 65 20 6e 61 6d 65 64 0a | 64 69 72 65 63 74 6f 72 |e named.|director|
|00005a20| 79 20 73 74 72 65 61 6d | 0a 74 6f 20 74 68 65 20 |y stream|.to the |
|00005a30| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 74 68 65 |beginnin|g of the|
|00005a40| 20 64 69 72 65 63 74 6f | 72 79 2e 0a 41 6c 6c 20 | directo|ry..All |
|00005a50| 62 75 66 66 65 72 65 64 | 20 64 61 74 61 20 66 6f |buffered| data fo|
|00005a60| 72 20 74 68 65 20 64 69 | 72 65 63 74 6f 72 79 20 |r the di|rectory |
|00005a70| 73 74 72 65 61 6d 20 69 | 73 20 64 69 73 63 61 72 |stream i|s discar|
|00005a80| 64 65 64 2c 0a 74 68 65 | 72 65 62 79 20 67 75 61 |ded,.the|reby gua|
|00005a90| 72 61 6e 74 65 65 69 6e | 67 20 74 68 61 74 20 74 |ranteein|g that t|
|00005aa0| 68 65 20 61 63 74 75 61 | 6c 0a 66 69 6c 65 20 73 |he actua|l.file s|
|00005ab0| 79 73 74 65 6d 20 64 69 | 72 65 63 74 6f 72 79 20 |ystem di|rectory |
|00005ac0| 77 69 6c 6c 20 62 65 20 | 72 65 66 65 72 72 65 64 |will be |referred|
|00005ad0| 20 74 6f 20 66 6f 72 20 | 74 68 65 20 6e 65 78 74 | to for |the next|
|00005ae0| 0a 2e 49 20 72 65 61 64 | 64 69 72 0a 6f 6e 20 74 |..I read|dir.on t|
|00005af0| 68 65 0a 64 69 72 65 63 | 74 6f 72 79 20 73 74 72 |he.direc|tory str|
|00005b00| 65 61 6d 2e 0a 2e 50 0a | 2e 49 20 43 6c 6f 73 65 |eam...P.|.I Close|
|00005b10| 64 69 72 0a 63 6c 6f 73 | 65 73 20 74 68 65 20 6e |dir.clos|es the n|
|00005b20| 61 6d 65 64 0a 64 69 72 | 65 63 74 6f 72 79 20 73 |amed.dir|ectory s|
|00005b30| 74 72 65 61 6d 3b 0a 69 | 6e 74 65 72 6e 61 6c 20 |tream;.i|nternal |
|00005b40| 72 65 73 6f 75 72 63 65 | 73 20 75 73 65 64 20 66 |resource|s used f|
|00005b50| 6f 72 20 74 68 65 0a 64 | 69 72 65 63 74 6f 72 79 |or the.d|irectory|
|00005b60| 20 73 74 72 65 61 6d 20 | 61 72 65 20 6c 69 62 65 | stream |are libe|
|00005b70| 72 61 74 65 64 2c 0a 61 | 6e 64 20 73 75 62 73 65 |rated,.a|nd subse|
|00005b80| 71 75 65 6e 74 20 75 73 | 65 20 6f 66 20 74 68 65 |quent us|e of the|
|00005b90| 20 61 73 73 6f 63 69 61 | 74 65 64 0a 2e 53 4d 20 | associa|ted..SM |
|00005ba0| 44 49 52 0a 6f 62 6a 65 | 63 74 20 69 73 20 6e 6f |DIR.obje|ct is no|
|00005bb0| 20 6c 6f 6e 67 65 72 20 | 76 61 6c 69 64 2e 0a 2e | longer |valid...|
|00005bc0| 49 20 43 6c 6f 73 65 64 | 69 72 0a 72 65 74 75 72 |I Closed|ir.retur|
|00005bd0| 6e 73 20 61 20 76 61 6c | 75 65 20 6f 66 20 7a 65 |ns a val|ue of ze|
|00005be0| 72 6f 20 69 66 20 6e 6f | 20 65 72 72 6f 72 20 6f |ro if no| error o|
|00005bf0| 63 63 75 72 73 2c 0a 5c | 2d 31 20 6f 74 68 65 72 |ccurs,.\|-1 other|
|00005c00| 77 69 73 65 2e 0a 2e 50 | 0a 54 68 65 72 65 20 61 |wise...P|.There a|
|00005c10| 72 65 20 73 65 76 65 72 | 61 6c 20 70 6f 73 73 69 |re sever|al possi|
|00005c20| 62 6c 65 20 65 72 72 6f | 72 73 20 74 68 61 74 20 |ble erro|rs that |
|00005c30| 63 61 6e 20 6f 63 63 75 | 72 0a 61 73 20 61 20 72 |can occu|r.as a r|
|00005c40| 65 73 75 6c 74 20 6f 66 | 20 74 68 65 73 65 20 6f |esult of| these o|
|00005c50| 70 65 72 61 74 69 6f 6e | 73 3b 0a 74 68 65 20 65 |peration|s;.the e|
|00005c60| 78 74 65 72 6e 61 6c 20 | 69 6e 74 65 67 65 72 20 |xternal |integer |
|00005c70| 76 61 72 69 61 62 6c 65 | 0a 2e 49 20 65 72 72 6e |variable|..I errn|
|00005c80| 6f 0a 69 73 20 73 65 74 | 20 74 6f 20 69 6e 64 69 |o.is set| to indi|
|00005c90| 63 61 74 65 20 74 68 65 | 20 73 70 65 63 69 66 69 |cate the| specifi|
|00005ca0| 63 20 65 72 72 6f 72 2e | 0a 2e 52 49 20 28 20 52 |c error.|..RI ( R|
|00005cb0| 65 61 64 64 69 72 20 27 | 73 0a 64 65 74 65 63 74 |eaddir '|s.detect|
|00005cc0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 6e 6f 72 6d 61 |ion of t|he norma|
|00005cd0| 6c 20 65 6e 64 20 6f 66 | 20 61 20 64 69 72 65 63 |l end of| a direc|
|00005ce0| 74 6f 72 79 0a 69 73 20 | 6e 6f 74 20 63 6f 6e 73 |tory.is |not cons|
|00005cf0| 69 64 65 72 65 64 20 74 | 6f 20 62 65 20 61 6e 20 |idered t|o be an |
|00005d00| 65 72 72 6f 72 2e 29 0a | 2e 53 48 20 45 58 41 4d |error.).|.SH EXAM|
|00005d10| 50 4c 45 0a 53 61 6d 70 | 6c 65 20 63 6f 64 65 20 |PLE.Samp|le code |
|00005d20| 77 68 69 63 68 20 73 65 | 61 72 63 68 65 73 20 74 |which se|arches t|
|00005d30| 68 65 20 63 75 72 72 65 | 6e 74 20 77 6f 72 6b 69 |he curre|nt worki|
|00005d40| 6e 67 20 64 69 72 65 63 | 74 6f 72 79 20 66 6f 72 |ng direc|tory for|
|00005d50| 20 65 6e 74 72 79 0a 2e | 49 52 20 6e 61 6d 65 20 | entry..|IR name |
|00005d60| 3a 0a 2e 50 0a 2e 66 74 | 20 42 0a 09 64 69 72 70 |:..P..ft| B..dirp|
|00005d70| 20 3d 20 6f 70 65 6e 64 | 69 72 28 20 22 2e 22 20 | = opend|ir( "." |
|00005d80| 29 3b 0a 2e 62 72 0a 09 | 77 68 69 6c 65 20 28 20 |);..br..|while ( |
|00005d90| 28 64 70 20 3d 20 72 65 | 61 64 64 69 72 28 20 64 |(dp = re|addir( d|
|00005da0| 69 72 70 20 29 29 20 21 | 3d 20 4e 55 4c 4c 20 29 |irp )) !|= NULL )|
|00005db0| 0a 2e 62 72 0a 09 09 69 | 66 20 28 20 73 74 72 63 |..br...i|f ( strc|
|00005dc0| 6d 70 28 20 64 70 5c 2d | 3e 64 5f 6e 61 6d 65 2c |mp( dp\-|>d_name,|
|00005dd0| 20 6e 61 6d 65 20 29 20 | 3d 3d 20 30 20 29 0a 2e | name ) |== 0 )..|
|00005de0| 62 72 0a 09 09 09 7b 0a | 2e 62 72 0a 09 09 09 28 |br....{.|.br....(|
|00005df0| 76 6f 69 64 29 20 63 6c | 6f 73 65 64 69 72 28 20 |void) cl|osedir( |
|00005e00| 64 69 72 70 20 29 3b 0a | 2e 62 72 0a 09 09 09 72 |dirp );.|.br....r|
|00005e10| 65 74 75 72 6e 20 46 4f | 55 4e 44 3b 0a 2e 62 72 |eturn FO|UND;..br|
|00005e20| 0a 09 09 09 7d 0a 2e 62 | 72 0a 09 28 76 6f 69 64 |....}..b|r..(void|
|00005e30| 29 20 63 6c 6f 73 65 64 | 69 72 28 20 64 69 72 70 |) closed|ir( dirp|
|00005e40| 20 29 3b 0a 2e 62 72 0a | 09 72 65 74 75 72 6e 20 | );..br.|.return |
|00005e50| 4e 4f 54 5f 46 4f 55 4e | 44 3b 0a 2e 66 74 20 50 |NOT_FOUN|D;..ft P|
|00005e60| 0a 2e 53 48 20 22 53 45 | 45 20 41 4c 53 4f 22 0a |..SH "SE|E ALSO".|
|00005e70| 67 65 74 64 65 6e 74 73 | 28 32 29 2c 20 64 69 72 |getdents|(2), dir|
|00005e80| 65 6e 74 28 34 29 2e 0a | 2e 53 48 20 57 41 52 4e |ent(4)..|.SH WARN|
|00005e90| 49 4e 47 53 0a 45 6e 74 | 72 69 65 73 20 66 6f 72 |INGS.Ent|ries for|
|00005ea0| 20 22 2e 22 20 61 6e 64 | 20 22 2e 2e 22 0a 6d 61 | "." and| "..".ma|
|00005eb0| 79 20 6e 6f 74 20 62 65 | 20 72 65 70 6f 72 74 65 |y not be| reporte|
|00005ec0| 64 20 66 6f 72 20 73 6f | 6d 65 20 66 69 6c 65 20 |d for so|me file |
|00005ed0| 73 79 73 74 65 6d 20 74 | 79 70 65 73 2e 0a 2e 50 |system t|ypes...P|
|00005ee0| 0a 54 68 65 20 76 61 6c | 75 65 20 72 65 74 75 72 |.The val|ue retur|
|00005ef0| 6e 65 64 20 62 79 0a 2e | 49 20 74 65 6c 6c 64 69 |ned by..|I telldi|
|00005f00| 72 0a 6e 65 65 64 20 6e | 6f 74 20 68 61 76 65 20 |r.need n|ot have |
|00005f10| 61 6e 79 20 73 69 6d 70 | 6c 65 20 69 6e 74 65 72 |any simp|le inter|
|00005f20| 70 72 65 74 61 74 69 6f | 6e 0a 61 6e 64 20 73 68 |pretatio|n.and sh|
|00005f30| 6f 75 6c 64 20 6f 6e 6c | 79 20 62 65 20 75 73 65 |ould onl|y be use|
|00005f40| 64 20 61 73 20 61 6e 20 | 61 72 67 75 6d 65 6e 74 |d as an |argument|
|00005f50| 20 74 6f 0a 2e 49 52 20 | 73 65 65 6b 64 69 72 20 | to..IR |seekdir |
|00005f60| 2e 0a 53 69 6d 69 6c 61 | 72 6c 79 2c 0a 74 68 65 |..Simila|rly,.the|
|00005f70| 0a 2e 49 20 6c 6f 63 0a | 61 72 67 75 6d 65 6e 74 |..I loc.|argument|
|00005f80| 20 74 6f 0a 2e 49 20 73 | 65 65 6b 64 69 72 0a 6d | to..I s|eekdir.m|
|00005f90| 75 73 74 20 62 65 20 6f | 62 74 61 69 6e 65 64 20 |ust be o|btained |
|00005fa0| 66 72 6f 6d 20 61 20 70 | 72 65 76 69 6f 75 73 0a |from a p|revious.|
|00005fb0| 2e 49 20 74 65 6c 6c 64 | 69 72 0a 6f 70 65 72 61 |.I telld|ir.opera|
|00005fc0| 74 69 6f 6e 20 6f 6e 20 | 74 68 65 20 73 61 6d 65 |tion on |the same|
|00005fd0| 0a 64 69 72 65 63 74 6f | 72 79 20 73 74 72 65 61 |.directo|ry strea|
|00005fe0| 6d 2e 0a 2e 50 0a 2e 49 | 20 54 65 6c 6c 64 69 72 |m...P..I| Telldir|
|00005ff0| 0a 61 6e 64 0a 2e 49 20 | 73 65 65 6b 64 69 72 0a |.and..I |seekdir.|
|00006000| 61 72 65 20 75 6e 72 65 | 6c 69 61 62 6c 65 20 77 |are unre|liable w|
|00006010| 68 65 6e 20 75 73 65 64 | 20 69 6e 20 63 6f 6e 6a |hen used| in conj|
|00006020| 75 6e 63 74 69 6f 6e 20 | 77 69 74 68 0a 66 69 6c |unction |with.fil|
|00006030| 65 20 73 79 73 74 65 6d | 73 20 74 68 61 74 20 70 |e system|s that p|
|00006040| 65 72 66 6f 72 6d 20 64 | 69 72 65 63 74 6f 72 79 |erform d|irectory|
|00006050| 20 63 6f 6d 70 61 63 74 | 69 6f 6e 20 6f 72 20 65 | compact|ion or e|
|00006060| 78 70 61 6e 73 69 6f 6e | 0a 6f 72 20 77 68 65 6e |xpansion|.or when|
|00006070| 20 74 68 65 20 64 69 72 | 65 63 74 6f 72 79 20 73 | the dir|ectory s|
|00006080| 74 72 65 61 6d 20 68 61 | 73 20 62 65 65 6e 20 63 |tream ha|s been c|
|00006090| 6c 6f 73 65 64 20 61 6e | 64 20 72 65 6f 70 65 6e |losed an|d reopen|
|000060a0| 65 64 2e 0a 49 74 20 69 | 73 20 62 65 73 74 20 74 |ed..It i|s best t|
|000060b0| 6f 20 61 76 6f 69 64 20 | 75 73 69 6e 67 0a 2e 49 |o avoid |using..I|
|000060c0| 20 74 65 6c 6c 64 69 72 | 0a 61 6e 64 0a 2e 49 20 | telldir|.and..I |
|000060d0| 73 65 65 6b 64 69 72 0a | 61 6c 74 6f 67 65 74 68 |seekdir.|altogeth|
|000060e0| 65 72 2e 0a 2e 50 0a 54 | 68 65 20 65 78 61 63 74 |er...P.T|he exact|
|000060f0| 20 73 65 74 20 6f 66 0a | 2e 49 20 65 72 72 6e 6f | set of.|.I errno|
|00006100| 0a 76 61 6c 75 65 73 20 | 61 6e 64 20 6d 65 61 6e |.values |and mean|
|00006110| 69 6e 67 73 20 6d 61 79 | 20 76 61 72 79 20 61 6d |ings may| vary am|
|00006120| 6f 6e 67 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |ong impl|ementati|
|00006130| 6f 6e 73 2e 0a 2e 50 0a | 42 65 63 61 75 73 65 20 |ons...P.|Because |
|00006140| 64 69 72 65 63 74 6f 72 | 79 20 65 6e 74 72 69 65 |director|y entrie|
|00006150| 73 20 63 61 6e 20 64 79 | 6e 61 6d 69 63 61 6c 6c |s can dy|namicall|
|00006160| 79 0a 61 70 70 65 61 72 | 20 61 6e 64 20 64 69 73 |y.appear| and dis|
|00006170| 61 70 70 65 61 72 2c 0a | 61 6e 64 20 62 65 63 61 |appear,.|and beca|
|00006180| 75 73 65 20 64 69 72 65 | 63 74 6f 72 79 20 63 6f |use dire|ctory co|
|00006190| 6e 74 65 6e 74 73 20 61 | 72 65 20 62 75 66 66 65 |ntents a|re buffe|
|000061a0| 72 65 64 0a 62 79 20 74 | 68 65 73 65 20 72 6f 75 |red.by t|hese rou|
|000061b0| 74 69 6e 65 73 2c 0a 61 | 6e 20 61 70 70 6c 69 63 |tines,.a|n applic|
|000061c0| 61 74 69 6f 6e 20 6d 61 | 79 20 6e 65 65 64 20 74 |ation ma|y need t|
|000061d0| 6f 20 63 6f 6e 74 69 6e | 75 61 6c 6c 79 20 72 65 |o contin|ually re|
|000061e0| 73 63 61 6e 0a 61 20 64 | 69 72 65 63 74 6f 72 79 |scan.a d|irectory|
|000061f0| 20 74 6f 20 6d 61 69 6e | 74 61 69 6e 20 61 6e 20 | to main|tain an |
|00006200| 61 63 63 75 72 61 74 65 | 20 70 69 63 74 75 72 65 |accurate| picture|
|00006210| 0a 6f 66 20 69 74 73 20 | 61 63 74 69 76 65 20 65 |.of its |active e|
|00006220| 6e 74 72 69 65 73 2e 0a | 77 69 74 68 0a 66 69 6c |ntries..|with.fil|
|00006230| 65 20 73 79 73 74 65 6d | 73 20 74 68 61 74 20 70 |e system|s that p|
|00006240| 65 72 66 6f 72 6d 20 64 | 69 72 65 63 74 6f 72 79 |erform d|irectory|
|00006250| 20 63 6f 6d 70 61 63 74 | 69 6f 6e 20 6f 72 20 65 | compact|ion or e|
|00006260| 78 70 61 6e 73 69 6f 6e | 0a 6f 72 20 77 68 65 6e |xpansion|.or when|
|00006270| 20 74 68 65 20 64 69 72 | 65 63 74 6f 72 79 20 73 | the dir|ectory s|
|00006280| 74 72 65 61 6d 20 68 61 | 73 20 62 65 65 6e 20 63 |tream ha|s been c|
|00006290| 6c 6f 73 65 64 20 61 6e | 64 20 72 65 6f 70 65 6e |losed an|d reopen|
|000062a0| 65 64 2e 0a 49 74 20 69 | 73 20 62 65 73 74 20 74 |ed..It i|s best t|
|000062b0| 6f 20 61 76 6f 69 64 20 | 75 73 69 6e 67 0a 2e 49 |o avoid |using..I|
|000062c0| 20 74 65 6c 6c 64 69 72 | 0a 61 6e 64 0a 2e 49 20 | telldir|.and..I |
|000062d0| 73 65 65 6b 64 69 72 0a | 61 6c 74 6f 67 65 74 68 |seekdir.|altogeth|
|000062e0| 65 72 2e 0a 2e 50 0a 54 | 68 65 20 65 78 61 63 74 |er...P.T|he exact|
|000062f0| 20 73 65 74 20 6f 66 0a | 2e 49 20 65 72 72 6e 6f | set of.|.I errno|
|00006300| 0a 76 61 6c 75 65 73 20 | 61 6e 64 20 6d 65 61 6e |.values |and mean|
|00006310| 69 6e 67 73 20 6d 61 79 | 20 76 61 72 79 20 61 6d |ings may| vary am|
|00006320| 6f 6e 67 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |ong impl|ementati|
|00006330| 6f 6e 73 2e 0a 2e 50 0a | 42 65 63 61 75 73 65 20 |ons...P.|Because |
|00006340| 64 69 72 65 63 74 6f 72 | 79 20 65 6e 74 72 69 65 |director|y entrie|
|00006350| 73 20 63 61 6e 20 64 79 | 6e 61 6d 69 63 61 6c 6c |s can dy|namicall|
|00006360| 79 0a 61 70 70 65 61 72 | 20 61 6e 64 20 64 69 73 |y.appear| and dis|
|00006370| 61 70 70 65 61 72 2c 0a | 61 6e 64 20 62 65 63 61 |appear,.|and beca|
|00006380| 75 73 65 20 64 69 72 65 | 63 74 6f 72 79 20 63 6f |use dire|ctory co|
|00006390| 6e 74 65 6e 74 73 20 61 | 72 65 20 62 75 66 66 65 |ntents a|re buffe|
|000063a0| 72 65 64 0a 62 79 20 74 | 68 65 73 65 20 72 6f 75 |red.by t|hese rou|
|000063b0| 74 69 6e 65 73 2c 0a 61 | 6e 20 61 70 70 6c 69 63 |tines,.a|n applic|
|000063c0| 61 74 69 6f 6e 20 6d 61 | 79 20 6e 65 65 64 20 74 |ation ma|y need t|
|000063d0| 6f 20 63 6f 6e 74 69 6e | 75 61 6c 6c 79 20 72 65 |o contin|ually re|
|000063e0| 73 63 61 6e 0a 61 20 64 | 69 72 65 63 74 6f 72 79 |scan.a d|irectory|
|000063f0| 20 74 6f 20 6d 61 69 6e | 74 61 69 6e 20 61 6e 20 | to main|tain an |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.